NPM Updates all dependencies

Source: Internet
Author: User

Simply change every dependency's version * to and then run npm update --save .

  "Dependencies": {  "Express" :  "*" ,  "MongoDB" :  "*" , :  "*" ,  "RJs" :   "*" ,  "Jade"  :   "*" ,  "async" :  "*"  }      

After:

  "Dependencies": { "Express":  "~3.2.0" ,  "MongoDB" :  "~1.2.14" ,  "underscore" :  "~1.4.4" ,  "RJs" :  " ~2.10.0 ", " Jade ": span class= "str" > "~0.29.0" ,  "async" :< Span class= "PLN" >  "~0.2.7"  }      

Of course, this is the blunt hammer of updating dependencies. It ' s fine if-as you said-the project was empty and nothing can break.

On the other hand, if your ' re working in a more mature project, you probably want to verify that there is no breaking Chan Ges in your dependencies before upgrading.

To see which modules is outdated, just run npm outdated . It would list any installed dependencies that has newer versions available.

NPM Updates all dependencies

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.