Forcing npm to Update Packages to Latest

I have had a problem getting npm to update packages to the latest version.  The packages involved are packages that have been installed directly and have no dependencies.  It it is down to the use of semantic versioning in npm / node.js but knowing that does not help!

I have a package, canvas-gauges, installed via npm, that I wanted to update.  Running

told me that;

I wanted to update it to the latest version but despite repeated searches, on how to do this, I could not force npm to update the package.

Trying these did not work;

I also tried installing and running ncu but that complains there is no package.json file.

There is nothing wrong in what npm is doing, it is following the ‘Wanted’ version even though I wanted the latest evrsion.

Ultimately the solution was simple (just not easily found);

HTH

 

Facebooktwitterby feather
This entry was posted in Linux, Node-RED and tagged . Bookmark the permalink.

Leave a Reply

Your e-mail address will not be published.

*