1

For downloading the dependencies in Angular project, I ran npm install in cmd at project level folder. It seems this command is installing the latest version of the libraries and not the version mentioned in the package.json file. When I searched about the command it says this will download the version from packages.json. Does someone know about this?

E.g. In package.json version @angular/animations": "^4.0.0" and it downloaded @angular/animations@4.4.6

My Node version-6.11.3 and npm version-3.10.10

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Bantu11
  • 43
  • 8
  • 6
    Possible duplicate of [What's the difference between tilde(~) and caret(^) in package.json?](https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json) – Ayush Gupta Jan 13 '18 at 11:20

1 Answers1

0

If you want to download the exact package version, remove the caret in front of the package number e.g

 @angular/animations": "4.0.0"

You can find further info here http://nodesource.com/blog/semver-tilde-and-caret/

crdevdeu
  • 503
  • 1
  • 5
  • 15