Reputation: 146
I have this problem on create-react-app
my node version 10.16.3
my npm version 6.9.0
npx create-react-app mac
Creating a new React app in /home/brian/Documentos/mac/mac
.
warning You are using Node "13.0.0-nightly20190802452b393c1f" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0" Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts...
yarn add v1.17.3 warning You are using Node "13.0.0-nightly20190802452b393c1f" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0" [1/4] Resolving packages... [2/4] Fetching packages... error @babel/[email protected]: The engine "node" is incompatible with this module. Expected version ">=6.9.0". Got "13.0.0-nightly20190802452b393c1f" 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 /home/brian/Documentos/mac/mac has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting mac/ from /home/brian/Documentos/mac
Done.
Upvotes: 0
Views: 2737
Reputation: 5650
It appears the node version you're using isn't compatible. Can you try using node 10 or 12? I suggest using nvm
to manage the different node versions.
Many packages define an explicit node version in their package.json
. For example, in @babel/core
:
"engines": {
"node": ">=6.9.0"
},
It seems your node version: 13.0.0-nightly20190802452b393c1f
isn't valud for these requirements.
You can see the source in yarn
that handles this.
You can see here that it appears the semver
package does not handle this:
import semver from "semver";
console.log(semver.satisfies("13.0.0", ">=6.9.0")); // true
console.log(semver.satisfies("13.0.0-nightly20190802452b393c1f", ">=6.9.0")); // false
Upvotes: 0