没有不值得去解决的问题,也没有不值得去学习的技术!

Error When Running Yarn: The Engine “node” Is Incompatible With This Module

When running the yarn command, an error occurs: The engine "node" is incompatible with this module.Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "16.13.1"

1. When running the yarn command, an error occurs: The engine “node” is incompatible with this module.Expected version “^14.18.0 || ^16.14.0 || >=18.0.0”. Got “16.13.1”. See Figure 1.

When running the yarn command, an error occurs: The engine "node" is incompatible with this module.Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "16.13.1"
Figure 1
Plaintext

PS E:\wwwroot\shopify-app>yarn create @shopify/app
yarn create v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
error execa@7.2.0: The engine "node" is incompatible with this module. Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "16.13.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

2. ^16.14.0 is equivalent to >=16.14.0,<16.15, so I decided to reinstall the latest version of Node.js 16. I opened the URL: https://nodejs.org/dist/latest-v16.x/ and planned to download node-v16.20.2-x64.msi. However, I found that it does not meet the version dependency requirements. See Figure 2.

^16.14.0 is equivalent to >=16.14.0,<16.15, so I decided to reinstall the latest version of Node.js 16. I opened the URL: https://nodejs.org/dist/latest-v16.x/ and planned to download node-v16.20.2-x64.msi. However, I found that it does not meet the version dependency requirements
Figure 2

 

3. >=18.0.0 is also acceptable, so I finally decided to download the latest version of 18. I downloaded node-v18.18.0-x64.msi. When running the yarn command again, no error occurred. See Figure 3.

>=18.0.0 is also acceptable, so I finally decided to download the latest version of 18. I downloaded node-v18.18.0-x64.msi. When running the yarn command again, no error occurred
Figure 3
Plaintext

PS E:\wwwroot\shopify-app> node -v
v18.18.0
PS E:\wwwroot\shopify-app> yarn create @shopify/app
yarn create v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "typescript@>=2.7".
[4/4] Building fresh packages...
success Installed "@shopify/create-app@3.49.3" with binaries:
      - create-app

Welcome. Let’s get started by naming your app project. You can change it later.

?  Your project name?
>  fruitful-shareholder-app
   ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系