I've an angular app. In the package.json I defined for all angular packages the version 12.2.9 like:
"@angular/animations": "^12.2.9",
"@angular/cdk": "^12.2.9",
"@angular/common": "^12.2.9",
"@angular/compiler": "^12.2.9",
"@angular/core": "^12.2.9",
...
I deleted the node_modules folder and the 'package-lock.json`
The I installed all packages with npm install
After that, calling npm outdated, the current version for all my angular packages is 12.2.13 and not 12.2.9
Where is defined, that the 12.2.13 version is installed and not the version from the package.json?
In
package-lock.jsonthere is all information about your installed packages innode_modules. if you go there and search the file for@angular/animationsfor instance you will see your version.Solution is to delete
node_modulesandpackage-lock.jsonand clear cache by runningnpm cache clean --force.UPDATE:
As Harun Yilmaz mentioned in comments:
You can find out what exactly
^and~do in npm package managing in this answer by jgillich.