V
V
Vyacheslav Lebedev2015-06-16 12:05:58
Node.js
Vyacheslav Lebedev, 2015-06-16 12:05:58

How to update npm packages to latest version and keep version in package.json?

Good afternoon!
Part of package:

"devDependencies": {
    "debug": "2.2.0"
},
"dependencies": {
    "body-parser": "1.13.0"
}

There are new versions, how to update them and write the versions to a file?
Now I'm updating manually, it's not very convenient :(
PS:
Deleting the node_modules folder helped, and the npm update --save and npm update--save-dev commands, which, in theory, were supposed to update packages and prescribe new versions in package.json, without deleting a folder...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Demin, 2015-06-16
@slavikse

npm update --save

Y
Yura Komarov, 2016-10-04
@Yurajun

npm install [email protected] -g

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question