Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

I copied package.json from another project and now want to bump all of the dependencies to their latest versions since this is a fresh project and I don't mind fixing something if it breaks.

What's the easiest way to do this?

The best way I know of now is to run npm info express version then update package.json manually for each one. There must be a better way.

"name": "myproject", 

"description": 

"my node project",

"version": "1.0.0", 

"engines": { 

"node": "0.8.4",

"npm": "1.1.65" 

}, 

"private": true, 

"dependencies": { 

"express": "~3.0.3",// how do I get these bumped to latest?

"mongodb": "~1.2.5", 

"underscore": "~1.4.2", 

"rjs": "~2.9.0", 

"jade": "~0.27.2",

"async": "~0.1.22" 

  }

}

1 Answer

0 votes
by (106k points)

This can be done using npm-check-updates:-

npm i -g npm-check-updates 

ncu -u 

npm install

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...