-bash: grunt: command not found

Neha

I was using node 0.10.35 and grunt command was working fine. Now after upgrading to 0.12.3 grunt command has stopped working.

OS: Mac OSX 10.10.1 node: 0.12.3 npm: 2.9.1 grunt: 0.4.5

I thought there may be problem in node installation, so I clean installed it 3-4 times

I tried installing with -

  1. node-v0.12.3.pkg
  2. Node Version Manager (nvm)

Many of solutions to such problems have suggested to use npm install -g grunt-cli

and then use npm install to install local node-modules.

I followed that procedure but I getting the same error.

Neha

Find where alias to grunt executable is located and check whether path to the file exist in PATH environment variable. If it doesn't exist, add path inside PATH.

Normally, grunt executable is added inside, /usr/local/bin folder. But for my installation, it was placed inside /Users/<Username>/.node/bin folder. So I needed to add /Users/<Username>/.node/bin path to PATH variable.

To know how to edit PATH environment variable, see link.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related