in React, React Native

npm command help

 

Install  node.js package in package.json


> npm install

Check for latest version of available package in package.json.


For this install  npm-check-updates

> npm install -g npm-check-updates

then, to show any new dependencies for the project in the current directory:

ncu 

 express           4.12.x  →   4.13.x
 multer            ^0.1.8  →   ^1.0.1
 react-bootstrap  ^0.22.6  →  ^0.24.0
 react-a11y        ^0.1.1  →   ^0.2.6
 webpack          ~1.9.10  →  ~1.10.5

 

Run with -u to upgrade your package.json

> ncu -u 
express           4.12.x  →   4.13.x
 
package.json upgraded

 

Globally install the node package.


> npm install –g react

 

Download and save node package to package.json


> npm install –save react

 

Download and save latest version of node package 


npm install –save react@latest

 

 

 

 

Write a Comment

Comment