Reputation: 32758
I'm using node.js and bower. I want to install bower at global level. Also, I need it to be included in the package.json
file under devDependency
.
so I tried,
npm install -g bower --save-dev
Bower is installed successfully but I don't see the package.json file is getting updated. What could the issue?
Upvotes: 4
Views: 1513
Reputation: 33399
Probably because you're installing it globally. When you install it globally, it won't get saved locally.
To be able to use it locally, through npm init
, you can include it in the devDependencies
, and then reference it as ./node_modules/.bin/bower
, since npm stores executables there.
Upvotes: 6