An error was reported when initializing the react project:
error [email protected]: The engine “node” is incompatible with this module. Expected version “^6.14.0 || ^8.10.0 || >=9.10.0”. Got “8.9.4”
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
This is caused by the incompatibility of the node version. Upgrading the node version can solve it, or it can be solved without upgrading. Use the following command:
1
|
npx create-react-app my-app --use-npm |
Official issues: https://github.com/facebook/create-react-app/issues/5714 and https://github.com/facebook/create-react-app/issues/3974
problem:
Guys, a few days ago, I installed `yarn` on my Mac just because it’s necessary for a project where I’m involved.
My problem is that, now, when I create a new app with `CRA`, it’s going to use `yarn` instead of `npm`. And, to be honest, I prefer `npm`.
Is there a way to force to use `npm` instead of `yarn`?
Or should I wait until finish the initial setup, then remove the `yarn.lock` file, the `node_modules` folder and then run `npm i`?
answer:
You can run CRA with `–use-npm` flag to force it to use npm.
Read More:
- Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0
- [Solved] Yarn install Error: “error Found incompatible module.”
- NPM run dev Error Module build failed: Error: Cannot find module ‘node-sass’
- Eslint error “no undef” and eslint rule configuration in Vue cli3
- [Solved] Unreal uses Houdini engine error: Houdini Engine Plugin Warning
- Eslint Error:“Identifier xxx is not in camel case“
- [Solved] internal/modules/cjs/loader.js:892 ^Error: Cannot find module ‘C:\Users\LX\Desktop\Node_DEMO\a
- [Solved] eggjs Error: Warning: Current Server Discovery and Monitoring engine is deprecated, and will be rem…
- [Solved] node Error: SyntaxError: Cannot use import statement outside a module
- NPM install error: Cannot find module ‘D:\zip\node_modules\npm\bin\npm-cli.js‘
- Node Kubelet Error: node “xxxxx“ not found [How to Solve]
- Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to
- Vue Import Baidu map error: BMap is not defined, eslint BMap reports an error
- Error husky > pre-commit (node v10.16.3) is reported when git commit is submitted
- How to Solve “/usr/bin/ld: skipping incompatible”
- /usr/bin/ld: skipping incompatible Error [How to Fix]
- [Solved] pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
- visual studio Error D8016 ‘/ZI’ and ‘/Gy-‘ command-line options are incompatible
- Cocos creator custom engine NPM Error [How to Fix]