when I'm trying to install eslint-config-airbnb with npx install-peerdeps --dev eslint-config-airbnb I'm getting following error (--legacy-peer-deps flag doesn't help):
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: favnote#0.1.0
npm ERR! Found: eslint#7.2.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"7.2.0" from the root project
npm ERR! peer eslint#"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb#18.2.1
npm ERR! node_modules/eslint-config-airbnb
npm ERR! dev eslint-config-airbnb#"18.2.1" from the root project
npm ERR! 3 more (eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" from eslint-plugin-react-hooks#4.0.0
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR! dev eslint-plugin-react-hooks#"4.0.0" from the root project
npm ERR! peer eslint-plugin-react-hooks#"^4 || ^3 || ^2.3.0 || ^1.7.0" from eslint-config-airbnb#18.2.1
npm ERR! node_modules/eslint-config-airbnb
npm ERR! dev eslint-config-airbnb#"18.2.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! ```
Run npm install --legacy-peer-deps and they will install successfully.
Looking at your package.json and comparing it to the peer dependencies listed for eslint-config-airbnb, you already have all the peer dependencies in your package.json as dev dependencies. (They were probably added there when you ran the npx install-peerdeps command but then that command tried to run npm install and failed.)
You can try locking in a specific working Node version by using nvm to roll Node back a few versions.
I rolled back from v16.15 to v16.13 and that seemed to fix the issue locally so I locked in that version with node -v > .nvmrc so that my hosting on Netlify/Vercel will use the version I specified.
Related
I just updated all my node modules using npm-check-updates.
I did this so I could install the latest version ngx-stripe, which needed some updated node modules that I didn't have installed.
After updating all my node modules and then trying to install ngx-stripe I got this error below, showing me that ngx-gallery-9#1.0.6 has a peer dependency of tslib 1.10.0, which is true, but my installed version is tslib 2.5.0 in node modules.
QUESTION - Should I use --force or --legacy-peer-deps when running the npm install for ngx-stripe or is there something else I should try first like updating the tslib peer dependency for ngx-gallery-9?
Here is what I see:
➜ client git:(master) ✗ npm install ngx-stripe #stripe/stripe-js
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: ngx-gallery-9#1.0.6
npm ERR! Found: tslib#2.5.0
npm ERR! node_modules/tslib
npm ERR! tslib#"^2.3.0" from #angular/animations#15.1.2
npm ERR! node_modules/#angular/animations
npm ERR! peerOptional #angular/animations#"15.1.2" from #angular/platform-browser#15.1.2
npm ERR! node_modules/#angular/platform-browser
npm ERR! peer #angular/platform-browser#"15.1.2" from #angular/forms#15.1.2
npm ERR! node_modules/#angular/forms
npm ERR! peer #angular/forms#"^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0" from #zxing/ngx-scanner#3.8.0
npm ERR! node_modules/#zxing/ngx-scanner
npm ERR! 2 more (ngx-bootstrap, the root project)
npm ERR! 3 more (#angular/platform-browser-dynamic, #angular/router, the root project)
npm ERR! peer #angular/animations#"^15.0.0" from ngx-bootstrap#10.2.0
npm ERR! node_modules/ngx-bootstrap
npm ERR! ngx-bootstrap#"^10.2.0" from the root project
npm ERR! 1 more (the root project)
npm ERR! tslib#"^2.3.0" from #angular/common#15.1.2
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"15.1.2" from #angular/forms#15.1.2
npm ERR! node_modules/#angular/forms
npm ERR! peer #angular/forms#"^11.2.11 || ^12.0.4 || ^13.0.0 || ^14.0.0 || ^15.0.0" from #zxing/ngx-scanner#3.8.0
npm ERR! node_modules/#zxing/ngx-scanner
npm ERR! #zxing/ngx-scanner#"^3.8.0" from the root project
npm ERR! 2 more (ngx-bootstrap, the root project)
npm ERR! peer #angular/common#"^15.0.0 || ^16.0.0" from #angular/google-maps#15.1.2
npm ERR! node_modules/#angular/google-maps
npm ERR! #angular/google-maps#"^15.1.2" from the root project
npm ERR! 10 more (#angular/platform-browser, ...)
npm ERR! 20 more (#angular/compiler, #angular/compiler-cli, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslib#"^1.10.0" from ngx-gallery-9#1.0.6
npm ERR! node_modules/ngx-gallery-9
npm ERR! ngx-gallery-9#"^1.0.6" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: tslib#1.14.1
npm ERR! node_modules/tslib
npm ERR! peer tslib#"^1.10.0" from ngx-gallery-9#1.0.6
npm ERR! node_modules/ngx-gallery-9
npm ERR! ngx-gallery-9#"^1.0.6" 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/charles/.npm/_logs/2023-01-27T08_58_58_320Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/charles/.npm/_logs/2023-01-27T08_58_58_320Z-debug-0.log
➜ client git:(master) ✗
Your problem is completely unrelated to ngx-stripe, but whenever you run npm install, NPM tries to fix all of its dependencies in package.json at the same time, and because you have a problem with ngx-gallery-9, all npm installs are failing. You can ignore the error for now, using --legacy-peer-deps, which will tell NPM to not try to deal with peer dependencies and just let you install the thing you want to install (ngx-stripe).
With regards to fixing the error itself, there's not much you can do here. ngx-gallery-9 is using an older version of tslib, and hasn't been updated for a long time. There's currently an open bug requesting that the library maintainer update his packages.
More specifically,
Angular 15 requires tslib#"^2.3.0", but ngx-gallery-9 requires tslib#"^1.10.0". You can try forcing it to use the latest version by using --legacy-peer-deps during ALL your future npm installations, as well as running npm install tslib#^2.3.0 --save --legacy-peer-deps to manually choose to use the newer version, which will force the whole project to use tslib#"^2.3.0" and ignore ngx-gallery-9's complaints, but there's a strong possibility that ngx-gallery-9 won't work as expected.
Your best bet is to either
use a different gallery than ngx-gallery-9, or
Simply ignore the problem. Force everything to use tslib#"^2.3.0" with npm install tslib#^2.3.0 --save --legacy-peer-deps and hope ngx-gallery-9 won't have any errors, or
downgrade Angular to an earlier version (Which is very messy, and not really recommended unless you didn't intend to be using Angular 15).
Edit:
Or instead undo all the changes that npm-check-updates did, and instead just install an older version of ngx-stripe that's compatible with all of your packages. ngx-stripe has a chart showing which version to use depending on your version of Angular, here: https://www.npmjs.com/package/ngx-stripe
Just type:
npm install ngx-stripe #stripe/stripe-js --force
or npm install ngx-stripe #stripe/stripe-js--legacy-peer-deps
This is the update error
i updated the css-loader and i am getting new error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app#0.1.0
npm ERR! Found: webpack#5.74.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^5.74.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" from html-webpack-plugin#3.2.0
npm ERR! node_modules/html-webpack-plug in
npm ERR! html-webpack-plugin#"^3.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\OBIORA JUSTICE\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\OBIORA JUSTICE\AppData\Local\npm-cache\_logs\2022-09-26T09_37_37_869Z-debug-0.log
The version of css-loader specified in your dependencies works with Webpack 4, but you're also depending on Webpack 5.
Upgrade css-loader in your package.json to a newer version (e.g. 6.7.1, the current version), then try again.
A total webpack nuild noobie and could use your wise assistance here.
Please help me resolve webpack errors in the following project:
https://github.com/webdesignleader/referBeam
THE CONSOLE ERRORS:
$ npx webpack --force
CLI for webpack must be installed.
webpack-cli (https://github.com/webpack/webpack-cli)
We will use "npm" to install the CLI via "npm install -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no): y
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: babel-loader#6.4.1
npm ERR! Found: webpack#5.72.1
npm ERR! node_modules/webpack
npm ERR! peer webpack#"^5.1.0" from terser-webpack-plugin#5.3.1
npm ERR! node_modules/terser-webpack-plugin
npm ERR! terser-webpack-plugin#"^5.1.3" from webpack#5.72.1
npm ERR! dev webpack#"^5.72.1" from the root project
npm ERR! 1 more (webpack-cli)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"1 || 2 || ^2.1.0-beta || ^2.2.0-rc" from babel-loader#6.4.1
npm ERR! node_modules/babel-loader
npm ERR! dev babel-loader#"^6.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack#2.7.0
npm ERR! node_modules/webpack
npm ERR! peer webpack#"1 || 2 || ^2.1.0-beta || ^2.2.0-rc" from babel-loader#6.4.1
npm ERR! node_modules/babel-loader
npm ERR! dev babel-loader#"^6.2.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 /home/oog/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/oog/.npm/_logs/2022-06-01T19_32_07_335Z-debug-0.log
undefined
Thank you!
I am receiving the following errors when I try to run a Vue.js calendar app on Vue3 from this tutorial here
https://github.com/zfhui/fullstack-vue/tree/master/02-calendar_app
I am running the following versions: npm 8.12.1 and node v16.15.1
I receive the following errors when I try to run it using npm install and/or npm run dev:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config production Use `--omit=dev` instead.
npm WARN config production Use `--omit=dev` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: babel-loader#7.1.5
npm ERR! Found: webpack#5.73.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^5.72.1" from the root project
npm ERR! peer webpack#"4.x.x || 5.x.x" from #webpack-cli/configtest#1.1.1
npm ERR! node_modules/#webpack-cli/configtest
npm ERR! #webpack-cli/configtest#"^1.1.1" from webpack-cli#4.9.2
npm ERR! node_modules/webpack-cli
npm ERR! dev webpack-cli#"^4.9.2" from the root project
npm ERR! 3 more (#webpack-cli/configtest, #webpack-cli/info, #webpack-cli/serve)
npm ERR! 6 more (css-loader, terser-webpack-plugin, vue-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"2 || 3 || 4" from babel-loader#7.1.5
npm ERR! node_modules/babel-loader
npm ERR! dev babel-loader#"^7.1.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack#4.46.0
npm ERR! node_modules/webpack
npm ERR! peer webpack#"2 || 3 || 4" from babel-loader#7.1.5
npm ERR! node_modules/babel-loader
npm ERR! dev babel-loader#"^7.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.
npm ERR!
npm ERR! See C:\Users\NotAgainLarry\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\NotAgainLarry\AppData\Local\npm-cache\_logs\2022-06-03T06_24_14_414Z-debug-0.log
When I try to resolve the error by running npm audit fix --force, npm i or npm run dev, I get the following:
calendar-app#1.0.0 dev > cross-env NODE_ENV=development webpack-dev-server --open --hot [[100;90m..................[0m] -
: [32;40mtiming[0m [35mconfig:load:flatten[0m Completed in 3ms[0m[K [..................]
- : timing config:load:fla[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.devtool should match pattern "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$". BREAKING CHANGE since webpack 5: The devtool option is more strict.
Please strictly follow the order of the keywords in the pattern.
How do I get rid of these errors? And what does it mean by 'Please strictly follow the order of the keywords in the patter'?
It's a problem caused by a change on NPM. You can read more about it here:
https://github.com/npm/cli/issues/4998
Basically, the dependencies expected are not the ones npm is downloading.
How I fixed:
Pin your node version to 16.15.0 (you can do that with nvm)
Delete your node_modules and package-lock.json
npm install --legacy-peer-deps
It is my first time to clone react project from github
i did:
$ git clone <link>
after that:
npm install
but i faced an error with google-maps-react
$ npm install --save google-maps-react
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: #iso/here#4.0.0
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#"~0.14.8 || ^15.0.0 || ^16.0.0" from google-maps-react#2.0.6
npm ERR! node_modules/google-maps-react
npm ERR! google-maps-react#"^2.0.6" 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\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.
i tried:
$ npm cache clean --force
$ npm install -g npm
,:
$npm config set legacy-peer-deps true
,:
npm install --force
,:
npm install --save --legacy-peer-deps
,:
rm -rf node_modules
and more ..
node js version:
16.13.2
react version:
17.0.2
npm version:
8.4.1
nothing seem to work
am i missing something?
The project has a peer dependency on React 15 or 16 and you are using 17.0.2 - The npm error states the reason
Downgrade your react version if you want to use this library as is or change the package.json for the lib, test and confirm to the author that they are good on 17.0.2 raising a PR
"peerDependencies": {
"react": "~0.14.8 || ^15.0.0 || ^16.0.0",
"react-dom": "~0.14.8 || ^15.0.0 || ^16.0.0"
},
Here's npm telling you reason in the log
npm ERR! Fix the upstream dependency conflict, or retry
Solution:
The app is using "yarn"
I'm able now to run the app after installing "yarn add node-sass"