view raw
Costa Costa - 9 months ago 69
Node.js Question

How to replace * in package.json file

I have a package.json file that lists all the dependencies I have with *'s, but I want the latest packages. I tried:

npm install --save

But that didn't replace the *'s in the file. I tried with empty strings as well, that didn't work.


Older versions of npm will update package.json when you run npm update --save, but this appears to be broken in recent versions.

Alternatively, npm-check-updates can update your package.json.