'Angular revert from 13.3.8 to 13.3.7
Solution 1:[1]
Everything in the version report are global versions, except for the Angular
version.
For windows the global files are located in:
C:\Users\yourname\AppData\Roaming\npm\node_modules\@angular\
They are usually installed using the global flag -g
e.g.: npm install -g @angular/cli
The angular version is only filled in if you run ng v
inside a project.
If you open your lock-file (package-lock.json / yarn.lock / ... depending on your package manager), you will notice you will have version 13.3.8 in there.
In the package.json you will probably find something like ^13.3.5
remove the ^
if you want that specific version for some reason. Then just run install again with your package manager:
npm install
Solution 2:[2]
@H3AR7B3A7 was correct. Here's what I did to solve it. I decided to enforce v13.3.5 everywhere as that was causing issues when not in sync
Globally:
Delete the C:\Users\yourname\AppData\Roaming\npm\node_modules@angular\ folder
Run npm i g @angular/[email protected]
- Global install of v13.3.5
Locally:
Delete the package-lock.json
Delete the local node_modules by running rm node_modules
Delete .cache
Delete .angular
Make sure all package.json references to @angular were 13.3.5
Run npm i @angular/[email protected]
- Local install of v13.3.5
Runnpm install
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Ian Vink |