Reputation: 17
I am trying to set up grunt for a web build. When I run npm install -g grunt-cli
I get the following error:
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/grunt-cli/bin/grunt' -> '/usr/local/bin/grunt'
But if I try to run a grunt talk, I get this error:
-bash: grunt: command not found
I have tried uninstalling grunt with npm uninstall -g grunt-cli
but it does nothing. I'm at a loss here. How do I remove that version of grunt (that somehow doesn't exist) and reinstall globally?
Upvotes: 0
Views: 736
Reputation: 156
Try to add grunt-cli
to your PATH
after you run npm install -g grunt-cli
:
touch ~/.bash_profile
nano .bash_profile
and add this line in the end:
export PATH=/usr/local/share/npm/lib/node_modules/grunt-cli/bin:$PATH
and run:
source ~/.bash_profile
grunt --version
https://www.hongkiat.com/blog/grunt-command-not-found/
Upvotes: 1