Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error [email protected]: The engine "node" is incompatible with this module. when trying to create-react-app

I am trying to create a React App and I am getting the following error in my console.

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

yarn add v1.10.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning react-scripts > eslint > file-entry-cache > flat-cache > circular-   [email protected]: CircularJSON is in maintenance only, flatted is its successor.
[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". Got "9.5.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      /Volumes/server2/Desktop/JavaScript/birdcage has failed.

  Deleting generated file... package.json
  Deleting birdcage / from /Volumes/server2/Desktop/JavaScript
  Done.

I have tried brew upgrade node but that didn't seem to work. Any ideas on how this can be fixed would be greatly appreciated.

like image 688
AltBrian Avatar asked Oct 27 '18 19:10

AltBrian


4 Answers

I was facing the same issue, try to add "--use-npm" at the end of create react app commend.

create-react-app appname --use-npm

like image 145
Gopi Kannan Avatar answered Nov 10 '22 21:11

Gopi Kannan


One of the temporally fix is to run yarn install --ignore-engines

like image 23
gildniy Avatar answered Nov 10 '22 21:11

gildniy


I had the same problem, simply doing this solved the problem:

 npm install node@latest
like image 3
Nafis Avatar answered Nov 10 '22 19:11

Nafis


Try to uninstall yarn and install it via npm.

  1. npm i create-react-app -g
  2. create-react-app yourappname Make sure that node is installed!
like image 1
Nightroit Avatar answered Nov 10 '22 19:11

Nightroit