Mark Johnson
Mark Johnson

Reputation: 445

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:

(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.

Upvotes: 1

Views: 3209

Answers (1)

Suhas Gavad
Suhas Gavad

Reputation: 1229

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?

Upvotes: -1

Related Questions