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/core#7.5.5: 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.
create-react-app react-app --use-npm
This worked for me
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
Related
the react-scripts package provided by create react app requires a dependency eslint ^5.6.0.
it says that another version was detected higher up in the tree (version: 8.30.0) the latest I've installed. If I install the 5.6 version I get other errors instead of fixing it.
I've also tried the SKIP_PREFLIGHT in a .env file with no success. As well as the troubleshooting from the terminal (removedd the node module folder and npm install again).
Here are some of the things I've tried
craco: cannot find eslint loader (eslint-loader) - lastest error showing up
reintalled eslint (lastest version)
installed eslint different versions to match with the ones in the file
Reinstalled google-auth-library
troubleshooting from terminal (React Suggestions):
- Removed node_modules from user and ran npm install (install all node modules again)
- Added the SKIP_PREFLIGHT .env
- Under Package.json removed and added again the eslintConfig / changed "eslint": "8.31" to recommended one (version 7)
- Deleted package-lock (added back after no success)
- devDependencies Removed ESLint (added back after no success)
- npm audit
From StackOverflow:
- Added to craco eslint: { enable: false},
- Updated npm
- Changed craco version to 6.4
- npm install -D eslint to install in the devDependecy
- Added module: rules on craco
- downgraded to npm install webpack#5.75.0
New error messages: craco cannot find ESLint loader (eslint-loader) - eslint-loader is deprecated, tried installing eslint-webpack-plugin.. same problem
Any ideas about what might be happening?
I had multiple versions of eslint - the problem went away when I updated to version 8 (updating the manifest as well)
I am trying to create a new react project (I work on Mac OS).
To do that, according the documentation, I enter this :
npx create-react-app bet-front
I obtain this error :
yarn add v1.3.2
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
error #typescript-eslint/eslint-plugin#2.24.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1".
error Found incompatible module
I updated my node version (here), I have now : v12.16.2
I updated npm version, I have now : 6.14.4
Despite these upgrades, I have the same errors to create a new react project. Do I have the right versions of these tools to create a new react project ? What can I do more ?
Edit 1
I already tried this without success, and same error : npm init react-app bet-front
Edit 2
I uninstalled node and npm and re installed it. And then retried the command to create a new React project. And no changes : same error about the #typescript-eslint/eslint-plugin#2.24.0.
I finally succeeded to create this new react project :
sudo npm i -g create-react-app
I do not know why it works using sudo ! usually I do not need it. Strange !
I came across the same issue after updating my node and npm versions. Used this link as guidance: https://phoenixnap.com/kb/update-node-js-version.
I didn't realize my nvm version was also out of date and finally was able to run create-react-app!
You can check your nvm version like so:
nvm -ls
Then check for the latest version available:
nvm ls-remote
Finally, install:
nvm install [version-number]
Hope this helps you as it did for me!
When I try to create a new react app with create-react-app, I got the following:
ยป npx create-react-app my-order
Creating a new React app in /Users/ian/myproject/my-order.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.19.0
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/ian/myproject/my-order/yarn-error.log".
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/ian/myproject/my-order has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
And my local environment information is like this:
ยป npx create-react-app --info
Environment Info:
System:
OS: macOS 10.14.6
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU # 2.50GHz
Binaries:
Node: 11.1.0 - /usr/local/bin/node
Yarn: 1.19.0 - ~/.yarn/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Browsers:
Chrome: 80.0.3987.100
Firefox: 72.0.2
Safari: 12.1.2
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 2.1.1
Anyone have any idea what's going on here?
Try
yarn install --registry=https://registry.yarnpkg.com/
it worked for me
Sometimes there is a problem accessing npmjs.com and installing scoped packages. Try to check https://status.npmjs.org/
If you use NVM, you might have this problem occur if you switched away from your primary nodejs version that you first had installed, so just change back if you can:
nvm use <original node installation's version>
But, if that doesn't work for you, then in your shoes I'd try reinstalling node directly from the website if I can't just use a non-NVM installation: https://nodejs.org/en/
For some people it seems they have an EACCESS error, and that might be fixed by changing their registry from http to https.
Example using NPM, rather than Yarn:
npm install --registry=https://registry.npmjs.org/
A similar problem: Cannot run npm install from nvm, but working well using source from https://nodejs.org/en/download/
Try with yarn install --registry=https://registry.yarnpkg.com/.
Hope it works!
Try this in your command:
yarn cache clean
yarn
and it will probably work...
I too get the error An unexpected error occurred: "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz: Request failed \"503 Service Unavailable\""
I changed from var to let in my code and It works fine.
I'm starting with Gatsby. Trying to use gatsby-source-pg plugin. But facing issues with multiple graphql versions. I asked author of this plugin about this issue on github and he was very helpful in answering my question.
But may be I'm missing something here..
issue - https://github.com/graphile/gatsby-source-pg/issues/3
Any help is highly appreciated.
Ahh.. finding out correct version is tricky..
I created fresh project with gatsby new <project_name> and did npm install.
Installed plugin with npm install --save gatsby-source-pg
After this I searched for folders named graphql in node_modules and then prepared following resolution list -
"resolutions":{
"eslint-plugin-graphql/graphql": "14.1.1",
"express-graphql/graphql": "14.1.1",
"graphql-tools/graphql": "14.1.1",
"apollo-link/graphql": "14.1.1",
"apollo-utilities/graphql": "14.1.1",
"gatsby-source-graphql/graphql": "14.1.1",
"gatsby-source-pg/graphql": "14.1.1",
"#types/graphql": "14.1.1"
}
But then somehow, when I did yarn install, #types said that it did not like 14.1.1 and and offered a range of versions. I choose the latest one from the presented list, 14.0.7 and went ahead with installation. It still generated warnings as below -
yarn install
yarn install v1.12.3
info No lockfile found.
[1/4] Resolving packages...
Couldn't find any versions for "#types/graphql" that matches "14.1.1"
? Please choose a version of "#types/graphql" from this list: 14.0.7
warning Resolution field "graphql#14.1.1" is incompatible with requested version "graphql#0.13.x"
[2/4] Fetching packages...
info fsevents#1.2.7: The platform "win32" is incompatible with this module.
info "fsevents#1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "gatsby > express-graphql#0.6.12" has incorrect peer dependency "graphql#^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "gatsby > eslint-plugin-graphql#2.1.1" has incorrect peer dependency "graphql#^0.12.0 || ^0.13.0".
warning "gatsby > graphql-tools#3.1.1" has incorrect peer dependency "graphql#^0.13.0".
warning "gatsby > pnp-webpack-plugin > ts-pnp#1.0.1" has unmet peer dependency "typescript#*".
warning "gatsby-source-pg > gatsby-source-graphql > apollo-link#1.2.1" has incorrect peer dependency "graphql#^0.11.3 || ^0.12.3 || ^0.13.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 37.83s.
But now, I can use GraphiQL playground to execute my graphql queries and in the project as well.
Update:
You can minimize resolutions and just say:
"resolutions": {
"graphql": "14.x"
}
Special thanks to #benji from Postgraphile
Run npm list graphql
Then, check the highest version you found graphql.
After that, add this to your package.json:
"resolutions":{
"graphql": "<highest found version>"
}
Then, delete your package-lock.json and node_modules folder.
Run npm install
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 eslint#5.6.0: 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.
Error
error eslint#5.6.0: 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
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
Happy hacking!