Basically this. I've tried with both
npm init react-app my-app
and
npx create-react-app my-app
and I get always this message:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: #babel/core#7.12.3
npm ERR! node_modules/#babel/core
npm ERR! #babel/core#"7.12.3" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"*" from the root project
npm ERR! #babel/core#"^7.12.3" from #svgr/webpack#5.5.0
npm ERR! node_modules/#svgr/webpack
npm ERR! #svgr/webpack#"5.5.0" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"*" from the root project
npm ERR! 9 more (babel-jest, babel-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #babel/core#"^7.13.0" from #babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining#7.13.12
npm ERR! node_modules/#babel/preset-env/node_modules/#babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining
npm ERR! #babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining#"^7.13.12" from #babel/preset-env#7.14.4
npm ERR! node_modules/#babel/preset-env
npm ERR! #babel/preset-env#"^7.12.1" from #svgr/webpack#5.5.0
npm ERR! node_modules/#svgr/webpack
npm ERR! #svgr/webpack#"5.5.0" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Zio Matteo\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Zio Matteo\AppData\Local\npm-cache\_logs\2021-06-08T08_46_00_758Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting first/ from C:\Users\Zio Matteo\Desktop\react
Done.
npm ERR! code 1
npm ERR! path C:\Users\Zio Matteo\Desktop\react
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c create-react-app "first"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Zio Matteo\AppData\Local\npm-cache\_logs\2021-06-08T08_46_01_359Z-debug.log
I've also updated node but nothing works. My package.json is empty because this is the first package I'm trying to install, so I don't have node_modules folder neither. What can I do?
This is an issue of npm version. Upgrade to the latest version of npm:
npm install -g npm#latest
Also add babel:
npm install --save-dev #babel/core
If this solution doesn't work, you can simply try older npm version:
npm install npm#6.14.11 -g
Related
I have no idea what I need to do to get NPM install to run successfully after upgrading Node to 18.12.1 and npm to 9.2.0. I keep getting this upstream dependency error. I ran
npm install -g npm-check-updates
ncu -u
npm install
And now this is where I am.
npm install ─╯
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: hipersigno#undefined
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^17.0.0" from react-svgmt#1.2.0
npm ERR! node_modules/react-svgmt
npm ERR! react-svgmt#"^1.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/mchildress/.npm/_logs/2023-01-09T16_27_29_875Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mchildress/.npm/_logs/2023-01-09T16_27_29_875Z-debug-0.log
What's going on is that react-svgmt has react 17 set as a peer dependency. This means that it is built only to support react 17. You have react 18 installed and npm sees that conflict and bails. You have the following options:
Downgrade to React 17 by using npm install --save react#^17.0.0 react-dom#^17.0.0
Indicate that you are okay with having a potentially incompatible version by using npm install --legacy-peer-deps.
i tried everything updated node angular restarted pc did all possible stuff but still get this error and i dont know why.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! Found: #angular/common#13.1.3
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"~13.1.1" from the root project
npm ERR! peer #angular/common#">=12.0.0" from #abp/ng.account.core#5.3.4
npm ERR! node_modules/#abp/ng.account.core
npm ERR! #abp/ng.account.core#"~5.3.4" from #abp/ng.account#5.3.4
npm ERR! node_modules/#abp/ng.account
npm ERR! #abp/ng.account#"~5.3.4" from the root project
npm ERR! #abp/ng.account.core#"~5.3.4" from #abp/ng.theme.basic#5.3.4
npm ERR! node_modules/#abp/ng.theme.basic
npm ERR! #abp/ng.theme.basic#"~5.3.4" from the root project
npm ERR! 9 more (#angular/cdk, #angular/forms, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^14.1.0" from #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! peer #ng-bootstrap/ng-bootstrap#">=10.0.0" from #abp/ng.components#5.3.4
npm ERR! node_modules/#abp/ng.components
npm ERR! #abp/ng.components#"~5.3.4" from the root project
npm ERR! 1 more (#abp/ng.setting-management)
npm ERR!
npm ERR! Conflicting peer dependency: #angular/common#14.1.3
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"^14.1.0" from #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! peer #ng-bootstrap/ng-bootstrap#">=10.0.0" from #abp/ng.components#5.3.4
npm ERR! node_modules/#abp/ng.components
npm ERR! #abp/ng.components#"~5.3.4" from the root project
npm ERR! 1 more (#abp/ng.setting-management)
npm ERR!
....
What I am doing wrong? I just downloaded abp framework code from internet and run npm install but ended with this. What should i do?
use the flag --legacy-peer-deps
npm install [package] --legacy-peer-deps
ng-bootstrap#13.0.0 has exactly one dependancy. It's tslib. Which version are you using? Maybe try to update that.
I found some github repo that says to use yarn instead of npm and it helps. Thank anyway :)
Try the following steps one by one
Remove node_modules folder and package-lock.json and run again
npm install
Or, try to clear npm cache
npm cache clean --force
Or, run the command with the --legacy-peer-deps option
npm install --legacy-peer-deps
Or, run the command with the --force option
npm install --force
Terminal
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency
tree npm ERR! npm ERR! While resolving: instalawnrn#0.0.1 npm ERR!
Found: react#17.0.1 npm ERR! node_modules/react npm ERR!
react#"17.0.1" from the root project npm ERR! peer react#">= 16.0 ||
< 17.0" from react-native-maps#0.28.0 npm ERR!
node_modules/react-native-maps npm ERR! react-native-maps#"" from
the root project npm ERR! 2 more (react-native, react-native-web)
npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer
react#"17.0.2" from react-dom#17.0.2 npm ERR! node_modules/react-dom
npm ERR! peer react-dom#">=16.5.1" from react-native-web#0.11.7 npm
ERR! node_modules/react-native-web npm ERR! peer
react-native-web#"^0.11" from react-native-maps#0.28.0 npm ERR!
node_modules/react-native-maps npm ERR! react-native-maps#""
from the root project npm ERR! npm ERR! Fix the upstream dependency
conflict, or retry npm ERR! this command with --force, or
--legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See
C:\Users\kcopu\AppData\Local\npm-cache\eresolve-report.txt for a full
report.
The package manager can determine whether or not react-native-maps will be installed. NPM does not work but you can install the package with yarn for example 'yarn add react-native-maps' will work instead of npm Install.
You can do
npm i --legacy-peer-deps
Node packages after this command will be installed perfectly!
I am the same issue.
If I install with this command
npm install react-native-maps --save-exact
not work... but with this command
expo install react-native-maps
works!!
It is been a while that I am getting an error every time I create a react app.
I tried to remove all node/npm versions and I reinstall a clean one with the latest node LTS, however, I am still getting the below error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: type-fest#0.21.3
npm ERR! node_modules/type-fest
npm ERR! type-fest#"^0.21.3" from ansi-escapes#4.3.2
npm ERR! node_modules/ansi-escapes
npm ERR! ansi-escapes#"^4.2.1" from #jest/core#26.6.3
npm ERR! node_modules/#jest/core
npm ERR! #jest/core#"^26.6.0" from jest#26.6.0
npm ERR! node_modules/jest
npm ERR! peer jest#"^26.0.0" from jest-watch-typeahead#0.6.1
npm ERR! node_modules/jest-watch-typeahead
npm ERR! 1 more (react-scripts)
npm ERR! 1 more (jest-cli)
npm ERR! ansi-escapes#"^4.3.1" from jest-watch-typeahead#0.6.1
npm ERR! node_modules/jest-watch-typeahead
npm ERR! jest-watch-typeahead#"0.6.1" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"^4.0.3" from the root project
npm ERR! 2 more (jest-watcher, terminal-link)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional type-fest#"^0.13.1" from #pmmmwh/react-refresh-webpack-plugin#0.4.3
npm ERR! node_modules/#pmmmwh/react-refresh-webpack-plugin
npm ERR! #pmmmwh/react-refresh-webpack-plugin#"0.4.3" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"^4.0.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/johnnys/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/johnnys/.npm/_logs/2021-07-10T18_33_36_275Z-debug.log
You are getting the same type of error from a similar post about this issue npm audit fix --force never able to avoid vulnerabilities
There is also a closed ticket in GitHub create-react-app repo. Here is one of the answers:
Hi,
ensure that
your dependencies (including NodeJS/npm/npx/yarn) are up-to-date
ensure that CRA is not installed globally Follow
https://create-react-app.dev/docs/getting-started/ guide to get
started
You need probably keep updating the dependecies to the latest version and wait untill the latest release fix this issue.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: #angular-devkit/build-angular#0.12.4
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/compiler-cli#11.0.5
npm ERR! node_modules/#angular/compiler-cli
npm ERR! peer #angular/compiler-cli#"^11.0.0" from #angular-devkit/build-angular#0.1100.5
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Please try by using the below command :-
npm install --save-dev webpack-dev-server
Or
ng update #angular/cli #angular/core --allow-dirty --force
I solved the same problem downgrading npm to version 6
npm install -g npm#6.14.13
and then update Angular