angular-university / angular-course

Angular Core Deep Dive (Video Course) - https://angular-university.io/course/angular-course
MIT License
346 stars 585 forks source link

npm Install Error #48

Open COBAcode opened 2 years ago

COBAcode commented 2 years ago

Hello,

When cloning the project, and after downgrading to node 16 as directed in the repo, I receive this error and cannot run npm install on the cloned repo

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: codelyzer@0.0.28
npm ERR! Found: tslint@6.1.3
npm ERR! node_modules/tslint
npm ERR!   dev tslint@"~6.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer tslint@"^3.9.0" from codelyzer@0.0.28
npm ERR! node_modules/codelyzer
npm ERR!   dev codelyzer@"^0.0.28" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: tslint@3.15.1
npm ERR! node_modules/tslint
npm ERR!   peer tslint@"^3.9.0" from codelyzer@0.0.28
npm ERR!   node_modules/codelyzer
npm ERR!     dev codelyzer@"^0.0.28" 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! 

Any assistance would be appreciated.

samaty593 commented 2 years ago

hi, I just run into the same issue. To fix this you need to go to your package.json file and remove the "~" in front of
"tslint": "~6.1.0".

This way you're telling node that it's fine if it installs another version of tslint.

It might not be the most beautiful way to fix it but considering that it is not a core library of our application and that it is not going to make it into production we don't care much about security issues, right !?

Have a nice day.

JayakumarrDotnet commented 10 months ago

Hi

How to resolve this issue after npm start

error:

https://github.com/angular-university/angular-course/issues/60