Costa Costa - 1 year ago 146
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download