0

When I use this command ng update @angular/cli@8 @angular/core@8

I'm encountering an issue while trying to update Angular CLI and its core packages:

Package not installed: "@angular/core". Skipping.
Error: Command failed: npm get //registry.npmjs.org/:username
npm error The //registry.npmjs.org/:username option is protected, and can not be retrieved in this way

I have tried the following steps to resolve the issue:

  • Cleaned npm cache with npm cache clean --force.
  • Updated npm to the latest version with npm install -g npm@latest.

Despite these steps, the issue persists. Any suggestions on how to resolve this error?

PS C:\Users\og10\Desktop\5.07\ETerkinAngular-master\Portal\ClientApp> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^7.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^17.0.0" from @coreui/[email protected]
npm ERR! node_modules/@coreui/angular
npm ERR!   @coreui/angular@"^2.2.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 C:\Users\og10\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\og10\AppData\Local\npm-cache\_logs\2024-07-05T14_02_24_236Z-debug.log

I want to upgrade my Angular 7 project to Angular 8.

7
  • Which command did you run that led to the error? Commented Jul 5 at 12:55
  • These are versions which are over 5 years old and well out of support. It would be advisable to try NodeJS v12 and npm v6, which were latest at the time. Commented Jul 5 at 13:00
  • ng update @angular/cli@8 @angular/core@8 Commented Jul 5 at 13:06
  • According to the update guide, the correct command is NG_DISABLE_VERSION_CHECK=1 npx @angular/cli@8 update @angular/core@8 @angular/cli@8 Commented Jul 5 at 13:22
  • Package not installed: "@angular/core". Skipping. packageGroup metadata of package @angular/cli is malformed. Ignoring. its not working Commented Jul 5 at 13:53

0

Browse other questions tagged or ask your own question.