Search code examples
reactjsnpmcreate-react-appyarnpkg

Unusual error when running create-react-app in terminal on Mac


I have never had an error before running create-react-app, but when I have run it on my Mac today I keep getting the below error and have not been able to resolve it. I've tried updating node, Yarn, eslint, CRA, and also clearing the node cache and nothing works. Why is this error occurring and how can I resolve it so I can install create-react-app?

Creating a new React app in /Users/...

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

yarn add v1.10.1
[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". Got "9.3.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/johnwolfe/printPackageTest/printtest has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting printtest/ from /Users/johnwolfe/printPackageTest
Done.

Solution

  • Error

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

    Question

    Why is this error occurring and how can I resolve it so I can install create-react-app?

    Answer

    You might consider updating your NodeJS version :) It's quite clear that it's an incompatible issue between your NodeJS and the create-react-app