Package '@angular/core' is not a dependency. while updating angular 8 to angular 9
Asked Answered
H

1

30

While updating angular 8 project to angular 9 , getting error

✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 0 dependencies.
Package '@angular/core' is not a dependency.

command I use

ng update @angular/core@9 @angular/cli@9 --force
Hawes answered 29/10, 2021 at 6:55 Comment(0)
H
53

Run command

npm i

then it works

Hawes answered 29/10, 2021 at 8:19 Comment(4)
Yes, if you don't have the node_modules folder, it won't work. Ensure you resolve any issues with "npm install" first.Tuberculosis
Could you give a quick explanation for why this works?Mills
i had same problem , in my case i had to run " npm i " in all sub project(i used angular work space)Touslesmois
This worked, upgrading 14.0.3 to 14.2.8.Graphic

© 2022 - 2024 — McMap. All rights reserved.