I have npm-5.3.0
installed on my arch Linux.
I create a new project with npm init
and fill in the details. This creates a package.json file with the details.
After that when I do npm install <package> --save
, the file package.json
does not change, and there is no entry for dependencies in the file. I had installed the package globally previously if that matters.
I found that the --save
does not work with global and I had global=true
set in the .npmrc
file.
Setting global=false
in the file fixed it.
Check update is available npm i -g npm-check-updates npm-check-updates -u npm install
you have to change
"dependencies": { "express": " ", "mongodb": " ", "underscore": " ", "rjs": " ", "jade": " ", "async": " " }
then run npm update --save
ı have solved adding npm 'FIRST' module from to dependencies manuelly in package.js this problem. Next, you can try npm install moduleName --save
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.