NPM update <package> not working

Hey guys,

I’ve noticed that trying to update an NPM package doesn’t work and no errors are thrown.

Note: all the required setup is in place e.g. .npmrc file pointing to Nexus group registry which connects to the proxy registry… and works otherwise


You have a list of packages in your project’s package.json file.
In the terminal, your run npm outdated to check whether the versions in the package.json are current

For example:

package.json entry:@types/node”: “~8.9.4”,

Package: @types/node
Current: 8.9.5
Wanted: 8.9.5
Latest: 12.7.5

you then decide to update @types/node (or any) package:

npm update @types/node@12.7.5

This will not update your package and will not throw any error. If you don’t point to Nexus and run the update, it works as expected

Any ideas what could be causing this?

Check “Maximum metadata age” in your proxy repository settings. This option rechecks metada of packages of remote repository by default once in 24 hours.

You can use, as example, 60 minutes to make sure you have a fresh version of metadata from remote repository.

1 Like

Hi @ado, thanks for suggestion.

I did try this but with no success - even setting it to 1 minute. If I directly add the version in the package.json and run npm install, it will work fine.

Alternatively, if I don’t point to Nexus, and do the update (and all the commands mentioned), it also works fine.