Cannot npm install with latest version of npm (npm ERR! ERESOLVE could not resolve)
digeomel opened this issue ยท 6 comments
Hello, with:
~ node -v
v18.12.0
~ npm -v
9.1.2
When I try npm i
I am getting (on Windows 10, although I don't believe it matters):
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! While resolving: an-qrcode@1.0.7
npm ERR! Found: @angular/common@14.2.8
npm ERR! node_modules/@angular/common
npm ERR! dev @angular/common@"14.2.8" from the root project
npm ERR! peer @angular/common@"^14.0.0 || ^15.0.0" from @angular/cdk@14.2.6
npm ERR! node_modules/@angular/cdk
npm ERR! dev @angular/cdk@"14.2.6" from the root project
npm ERR! peer @angular/cdk@"14.2.6" from @angular/material@14.2.6
npm ERR! node_modules/@angular/material
npm ERR! dev @angular/material@"14.2.6" from the root project
npm ERR! 5 more (@angular/forms, @angular/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@">= 6.0.0 < 11.0.2" from an-qrcode@1.0.7
npm ERR! node_modules/an-qrcode
npm ERR! an-qrcode@"1.0.7" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/common@11.0.1
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@">= 6.0.0 < 11.0.2" from an-qrcode@1.0.7
npm ERR! node_modules/an-qrcode
npm ERR! an-qrcode@"1.0.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!
Sorry about this -- the an-qrcode
demands an old version of Angular, so installing currently requires the flag:
--legacy-peer-deps
while installing ๐ข
I'll try to fix this up somehow - at the very least with a comment in the README
๐
Thank you for raising this issue ๐ค
Thanks for the very prompt response! ๐ ๐๐ผ
I tried this already, and I get 8 high vulnerabilities ๐
~ npm install --legacy-peer-deps
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated asar@3.2.0: Please use @electron/asar moving forward. There is no API change, just a package name change
npm WARN deprecated electron-osx-sign@0.6.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
> video-hub-app-3@3.2.0 postinstall
> electron-builder install-app-deps
โข electron-builder version=23.6.0
โข loaded configuration file=D:\code\github\Video-Hub-App\electron-builder.json
added 1279 packages, and audited 1280 packages in 2m
190 packages are looking for funding
run `npm fund` for details
11 vulnerabilities (3 moderate, 8 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
I'll be running npm audit fix
(as usual) before I create the next release ๐ค
Thank you, and kudos for this amazing project! ๐ ๐๐ผ
ps - the repository that causes the error ๐
naimmalek/an-qrcode#7
I created a PR for it to fix the problem too ๐
naimmalek/an-qrcode#11
I updated the README
to make sure others don't run into this annoyance ๐
Cheers!