In my case,i use npm install moduleName -save
to install a module ,but after npm notice that it is install complete,the package.json will not be add dependencies of the module; Is there any solution to sync from module to dependencies; Thanks at first
你需要npm install moduleName --save
(2' - ')
Actually you can use one -s. Here is the quote from the npm documentation:
As of version 2.0.0 you can provide a path to a local directory that contains a package. Local paths can be saved using
npm install -S
ornpm install --save
, using any of these forms:
So if you wanted to install lodash you could use:
npm install lodash --save
or:
npm install -S lodash
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.