my node version is v6.6.0. my npm version is v4.0.5.
using npm ls -g already found grunt-cli has been installed
however, when I use npm install grunt -save-dev it show
SuoYong:grunt suoyong$ npm install grunt --save-dev
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/6.6.0/bin/node" "/usr/local/bin/npm" "install" "grunt" "--save-dev"
npm ERR! node v6.6.0
npm ERR! npm v4.0.5
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "grunt" under a package
npm ERR! also called "grunt". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/suoyong/Node/grunt/npm-debug.log
I have check this simple issue for two hours. but it does not solve. thanks
I have resolved this issue, because my package.json name is same with the grunt name. thanks stackoverflow space.
The issue is in your package.json file. You should change the name.
In "name": "grunt", set grunt to something else and it should work perfectly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With