$ npm i #aws-cdk/aws-ec2
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cdk_sample#0.1.0
npm ERR! Found: #aws-cdk/core#1.95.0
npm ERR! node_modules/#aws-cdk/core
npm ERR! #aws-cdk/core#"1.95.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #aws-cdk/core#"1.95.1" from #aws-cdk/aws-iam#1.95.1
npm ERR! node_modules/#aws-cdk/aws-iam
npm ERR! peer #aws-cdk/aws-iam#"1.95.1" from #aws-cdk/aws-ec2#1.95.1
npm ERR! node_modules/#aws-cdk/aws-ec2
npm ERR! #aws-cdk/aws-ec2#"*" from the root project
npm ERR! peer #aws-cdk/aws-iam#"1.95.1" from #aws-cdk/aws-cloudwatch#1.95.1
npm ERR! node_modules/#aws-cdk/aws-cloudwatch
npm ERR! peer #aws-cdk/aws-cloudwatch#"1.95.1" from #aws-cdk/aws-ec2#1.95.1
npm ERR! node_modules/#aws-cdk/aws-ec2
npm ERR! #aws-cdk/aws-ec2#"*" 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 /home/sean/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sean/.npm/_logs/2021-03-27T00_41_58_124Z-debug.log
sean#desktop:~/WebstormProjects/cdkSample$ npm i #aws-cdk/aws-ec2
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cdk_sample#0.1.0
npm ERR! Found: #aws-cdk/core#1.95.0
npm ERR! node_modules/#aws-cdk/core
npm ERR! #aws-cdk/core#"1.95.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #aws-cdk/core#"1.95.1" from #aws-cdk/aws-iam#1.95.1
npm ERR! node_modules/#aws-cdk/aws-iam
npm ERR! peer #aws-cdk/aws-iam#"1.95.1" from #aws-cdk/aws-ec2#1.95.1
npm ERR! node_modules/#aws-cdk/aws-ec2
npm ERR! #aws-cdk/aws-ec2#"*" from the root project
npm ERR! peer #aws-cdk/aws-iam#"1.95.1" from #aws-cdk/aws-cloudwatch#1.95.1
npm ERR! node_modules/#aws-cdk/aws-cloudwatch
npm ERR! peer #aws-cdk/aws-cloudwatch#"1.95.1" from #aws-cdk/aws-ec2#1.95.1
npm ERR! node_modules/#aws-cdk/aws-ec2
npm ERR! #aws-cdk/aws-ec2#"*" 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 /home/sean/.npm/eresolve-report.txt for a full report.
The --force option sounds non-ideal. What should be done to fix the upstream dependency conflict? I do know that AWS CDK is very strict when it comes to matching package versions between the core and construct libs.
// project generated via $ cdk init app --language typescript
"devDependencies": {
"#aws-cdk/assert": "1.95.0",
"#types/jest": "^26.0.10",
"#types/node": "10.17.27",
"aws-cdk": "1.95.0",
"jest": "^26.4.2",
"ts-jest": "^26.2.0",
"ts-node": "^9.0.0",
"typescript": "~3.9.7"
},
"dependencies": {
"#aws-cdk/core": "1.95.0",
"source-map-support": "^0.5.16"
}
From comments, installing the dependency with same version as of aws-cdk and #aws-cdk/core solved the issue.
npm install #aws-cdk/aws-ec2#1.95.0
Related
My project uses Chakra-UI and React. When trying to run npm install, I got this npm error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #choc-ui/chakra-autocomplete#5.1.2
npm ERR! Found: #chakra-ui/react#1.8.8
npm ERR! node_modules/#chakra-ui/react
npm ERR! #chakra-ui/react#"latest" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #chakra-ui/react#"^2.2.8" from #choc-ui/chakra-autocomplete#5.1.2
npm ERR! node_modules/#choc-ui/chakra-autocomplete
npm ERR! #choc-ui/chakra-autocomplete#"^5.1.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.2.0
npm ERR! node_modules/react
npm ERR! peer react#">=18" from #chakra-ui/react#2.3.5
npm ERR! node_modules/#chakra-ui/react
npm ERR! peer #chakra-ui/react#"^2.2.8" from #choc-ui/chakra-autocomplete#5.1.2
npm ERR! node_modules/#choc-ui/chakra-autocomplete
npm ERR! #choc-ui/chakra-autocomplete#"^5.1.2" 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.
I don't understand this error, I tried deleting node_modules and package-lock.json, ran npm install again, but same error. Any ideas?
run again npm install --legacy-peer-deps that will solve your issue
I have an existing project that installs already with yarn and I was trying to install npm but I faced this errors
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: NamalWoocommerce#0.0.1
npm ERR! Found: react-native#0.63.3
npm ERR! node_modules/react-native
npm ERR! react-native#"0.63.3" from the root project
npm ERR! peer react-native#"*" from react-native-render-html#4.2.5
npm ERR! node_modules/react-native-render-html
npm ERR! react-native-render-html#"^4.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native#">=0.60 <0.62" from react-native-webview#8.2.1
npm ERR! node_modules/react-native-webview
npm ERR! react-native-webview#"^8.0.4" from the root project
npm ERR! peer react-native-webview#"*" from react-native-render-html#4.2.5
npm ERR! node_modules/react-native-render-html
npm ERR! react-native-render-html#"^4.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! See C:\Users\Ahmed Al-sudairy\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\Ahmed Al-sudairy\AppData\Local\npm-cache\_logs\2022-09-17T07_45_05_943Z-debug-0.log
I deleted yarn.lock but I faced same issue
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: chat_application#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.1" from react-chat-engine#1.11.22
npm ERR! node_modules/react-chat-engine
npm ERR! react-chat-engine#"*" from the root project
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\Swapnil\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\Swapnil\AppData\Local\npm-cache\_logs\2022-04-28T04_06_41_338Z-debug-0.log
Try using - npm install --save modulename --legacy-peer-deps
I download my code on gitlab and use "npm install" to create "node-modules" but failed. Please help me
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vue-material-admin#1.0.3
npm ERR! Found: eslint#7.32.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^7.10.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#">= 1.6.0 < 7.0.0" from #vue/cli-plugin-eslint#4.5.13
npm ERR! node_modules/#vue/cli-plugin-eslint
npm ERR! dev #vue/cli-plugin-eslint#"~4.5.7" 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\Admin\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\Admin\AppData\Local\npm-cache\_logs\2021-08-26T17_56_58_931Z-debug.log
Help me
I'm developing a react native application. Throughout the project I have used Node package manager to install the packages. But I ran into this dependency problem first time when I try to install react-native-styled-components with npm, so I installed it with yarn.
Now I can't install any package with node package manager, I run into this unable to resolve dependency tree error.
PS C:\Users\94774\OneDrive\React Projects\Native Projects\Android\socialmediaapp> npm install react#latest react-native#latest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: socialmediaapp#0.0.1
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.1" from react-native#0.64.1
npm ERR! node_modules/react-native
npm ERR! react-native#"0.64.1" 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\94774\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\94774\AppData\Local\npm-cache\_logs\2021-05-06T12_12_44_173Z-debug.log
PS C:\Users\94774\OneDrive\React Projects\Native Projects\Android\socialmediaapp> npm install --save #react-native-firebase/app
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: socialmediaapp#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.8.0" from styled-components#5.3.0
npm ERR! node_modules/styled-components
npm ERR! styled-components#"^5.3.0" from the root project
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.8.0" from styled-components#5.3.0
npm ERR! node_modules/styled-components
npm ERR! styled-components#"^5.3.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! See C:\Users\94774\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\94774\AppData\Local\npm-cache\_logs\2021-05-06T12_41_01_675Z-debug.log
npm install react-native-styled-components --legacy-peer-deps