npm install the exact package version specified in package.json

后端 未结 3 1396
生来不讨喜
生来不讨喜 2020-12-08 18:39

Currently, If I run npm install, it installs the updated version of already installed packages. How can I install the exact version as specified in the pa

3条回答
  •  情话喂你
    2020-12-08 19:28

    That behavior is really driven by the one specifying the versions in the package.json. If the version number looks like "1.0.0", without any other symbols, the exact version (1.0.0) should be installed.

    So what you could do is simply modify the package.json and run a npm install then. Be sure to clear out the node_modules directory before you do that.

    https://docs.npmjs.com/files/package.json#dependencies

提交回复
热议问题