I'm new to node and I think the error is saying my node is too new. Other answers on this site are telling how to upgrade their node but how do I match my node with the one the package wants?
C:\react>npx create-strapi-starter@3 strapi-ecomm next-ecommerce
Need to install the following packages:
create-strapi-starter@3
Ok to proceed? (y) y
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'create-strapi-starter@3.6.8',
npm WARN EBADENGINE required: { node: '>=10.16.0 <=14.x.x', npm: '>=6.0.0' },
npm WARN EBADENGINE current: { node: 'v16.13.1', npm: '8.1.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'strapi-generate-new@3.6.8',
npm WARN EBADENGINE required: { node: '>=10.16.0 <=14.x.x', npm: '>=6.0.0' },
npm WARN EBADENGINE current: { node: 'v16.13.1', npm: '8.1.2' }
npm WARN EBADENGINE }
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
? Choose your installation type Quickstart (recommended)
Creating a quickstart project.
Creating a new Strapi application at C:\react\strapi-ecomm\backend.
Creating files.
Installing strapi/strapi-template-ecommerce template.
Error while installing dependencies:
warning ..\..\package.json: No license field
error backend@0.1.0: The engine "node" is incompatible with this module. Expected version ">=10.16.0 <=14.x.x". Got "16.13.1"
error Found incompatible module.
Keep trying!
Oh, it seems that you encountered errors while installing dependencies in your project.
Don't give up, your project was created correctly.
Fix the issues mentioned in the installation errors and try to run the following command:
cd C:\react\strapi-ecomm\backend && yarn install
C:\react>cd C:\react\strapi-ecomm\backend
C:\react\strapi-ecomm\backend>yarn install
yarn install v1.22.17
warning ..\..\package.json: No license field
info No lockfile found.
[1/5] Validating package.json...
error backend@0.1.0: The engine "node" is incompatible with this module. Expected version ">=10.16.0 <=14.x.x". Got "16.13.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Option #1 (NVM):
You have node v16.13.1
(on Windows), the framework ideally needs Node 14.X.X, you will need to downgrade your node, or my recommendation is using something like NVM, instructions can be found on:
https://github.com/coreybutler/nvm-windows#install-nvm-windows
Once installed you can run the following commands:
nvm install v14.18.3
and then nvm use v14.18.3
and finally running your command and therefore resetting up your project: npx create-strapi-starter@3 strapi-ecomm next-ecommerce
.
If you would like you can also create an .nvmrc
file and add the version (v14.18.3
) to it and default to it automatically in the desired directory.
For additional context, using NVM will allow you to use multiple verisons of NodeJS on your machine.
Option #2:
Uninstalling Node v16 and installing Node v14 from: https://nodejs.org/download/release/v14.18.3/