create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

[email protected]: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0"

Open JDWong-wag opened this issue 8 years ago • 21 comments

Is this a bug report?

yes

Environment

Environment: OS: macOS High Sierra 10.13.4 Node: 8.9.4 Yarn: 1.3.2 npm: 6.4.1 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: Not Found

Steps to Reproduce

type npx create-react-app test

Expected Behavior

it creates by react app

Actual Behavior

crashes. produces the following output:

Creating a new React app in /Users/jd/sandbox/test.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.3.2
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts --cwd /Users/jd/sandbox/test has failed.

Deleting generated file... package.json
Deleting test / from /Users/jd/sandbox
Done.

Reproducible Demo

type it in your command line

JDWong-wag avatar Oct 11 '18 01:10 JDWong-wag

I am experiencing the exact same issue, but I am running on a windows machine. Error occurred for me initially two days ago.

tubashawn avatar Oct 11 '18 02:10 tubashawn

Can you guys upgrade your node version to ^6.14.0 || ^8.10.0 || >=9.10.0?

bugzpodder avatar Oct 11 '18 05:10 bugzpodder

as @bugzpodder said you have to update your node and npm. you can do that by following this link (as I do and work for me!): https://nodejs.org/en/download/current/

AliRadmanesh avatar Oct 11 '18 08:10 AliRadmanesh

Thanks folks! That seems to have done the trick! I just completely reinstalled node and it is working. Not sure why it went haywire in the first place.

Thanks!

tubashawn avatar Oct 12 '18 04:10 tubashawn

I had to do this to update npm: npm install npm@latest -g

And I installed node 8.12.0 and it works again.

KarinGarciaZ avatar Oct 12 '18 22:10 KarinGarciaZ

Updating node to the latest version (v8.12.0) worked, thanks @bugzpodder !

JDWong-wag avatar Oct 12 '18 22:10 JDWong-wag

same issue here Thanks guys

RaghulReearg avatar Oct 13 '18 12:10 RaghulReearg

Successfully working after updating to latest version of node nvm install node Now using node v10.12.0 (npm v6.4.1)

My previous version of node was 8.14.0 and 8.9.12 where I was facing this issue.

hassantauqeer avatar Oct 13 '18 18:10 hassantauqeer

I recommend everyone to stick with node 8.12 LTS unless you have a reason to use a different version.

bugzpodder avatar Oct 13 '18 18:10 bugzpodder

I checked the versions of npm, yarn and node

npm -v
yarn -v
node -v

updated package.json with this versions and worked for me

pjbelo avatar Oct 14 '18 22:10 pjbelo

me too

ghost avatar Oct 17 '18 14:10 ghost

After reinstalling node completely (without deleting anything) to v8.12.0 (previously running v8.9.0) I was able to run npx create-react-app [file name].

As a side note I was already using npm v6.4.1 and yarn v1.3.2.

mikeyamato avatar Oct 18 '18 18:10 mikeyamato

See what versions of node you currently have nvm ls If you don't have an appropriate version (per the error), install it first nvm install 8 Now use it nvm use 8

v-stickykeys avatar Nov 07 '18 15:11 v-stickykeys

Yes, I saw my node version was outdated. nvm use stable solved it.

bretonio avatar Nov 26 '18 20:11 bretonio

This worked for me : create-react-app react-app --use-npm

hbthanki avatar Nov 29 '18 23:11 hbthanki

Can you guys upgrade your node version to ^6.14.0 || ^8.10.0 || >=9.10.0?

run sudo n stable to upgrade your node version to latest stable version(detail)

itlonewolf avatar Dec 05 '18 03:12 itlonewolf

i just install a Node.js via msi installer from there site , and it solved for me https://nodejs.org/en/

nekoten avatar Dec 11 '18 09:12 nekoten

@bugzpodder Still getting this error

error [email protected]: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0".

Even though I run npm install npm@latest -g it keeps using npm version 6.5.0

jonasdev avatar Dec 11 '18 20:12 jonasdev

@jonaskkristensen your problem isn't npm version, it is node. You need to upgrade node to match any of the versions above.

ahmadalfy avatar Dec 17 '18 15:12 ahmadalfy

Interesting, I have to use node.js 8.9.2 npm installs any version of eslint from 5.6.0 to 5.10.0. But yarn tells about incompatilibity.

Dzenly avatar Dec 18 '18 09:12 Dzenly