adding bower as devDependency in package.json

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?

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.