简体   繁体   中英

npm install not getting latest minor version of package

I have a colleague who's having issues with npm install, I'm wondering if anyone else has had the same issue...

Win 10 x64

Node 8.9.3

Global npm packages installed:

  • npm 5.6.0
  • rimraf 2.6.2

(We have multiple PCs all running identical node/npm versions for consistency, so this can't be updated on a whim)

We have a package json with a dev dependency of "typescript": ^"2.0.6"

On all other dev machines, doing npm install on a fresh clone of our repo (no node_modules / typings), we get given typescript 2.7.2, the latest minor version of typescript to date.

On this one machine, we are given 2.6.2, consistently.

We have completely uninstalled node, removed %UserProfile%\\AppData\\Roaming\\npm & %UserProfile%\\AppData\\Roaming\\npm-cache to no avail.

For completeness we have also run npm cache verify.

Any thoughts would be appreciated, we are stumped.

Might be the same problem here. I think below link helps you to get more about working with package versions.

as you specified that you have a package.json with a dev dependency of "typescript": ^"2.0.6".

Just try by replacing the below line in your package.json file.

"typescript": "exact version you needed"

Ex. "typescript": "2.0.6"

Including with this before running npm install just delete the package-lock.json file from your projects root directory if any.

Should I manually update dependencies versions in the package.json after creating a new project with npm?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM