Reputation: 61
I have installed node.js and npm on my OS X box running 10.11.5. But, following the instructions at http://docs.amber-lang.net/getting-started.html, when I type:
npm install -g amber-cli
in the Terminal, I get the following result:
npm WARN [email protected] requires a peer of grunt-cli@^0.1.13 but none was installed.
And the installation halts. Since this is only a warning from npm, I wonder if I really need grunt installed.
FWIW, it does appear I have a version of grunt in my npm directory because using locate to find it produces a billion lines, one of which is:
/Users/me/.npm/grunt
In fact, it looks like I have a bunch of grunt installs (most version 0.4.0). Which makes me reluctant to install grunt again since it doesn't seem to work anyway.
Upvotes: 0
Views: 53
Reputation: 17367
More than likely, it's a problem with your path.
If nothing returns when you execute which grunt
, it means that you need to add the location of grunt to your path.
If you installed grunt using npm install -g
, you'll need to add /usr/local/bin
to your path.
Since you found your grunt cli under ~/.npm
, you will need to add that to your path.
You should also add ./node_modules/bin
to your path which will cause your shell to check for npm-installed modules in the node_modules/bin
directory in your current directory.
You can always run grunt directly, irrespective of its location, by typing: npx grunt
using the tool included with npm
for running npm-installed commands.
It's good practice to add all of the paths above, to catch all possible npm-installed commands.
You can update your path in the ~/.*rc
file for your shell (~/.bashrc for bash, etc.), by adding this line to the end of your rc file:
export PATH=/usr/local/bin:~/.npm:./node_modules/bin:$PATH
Upvotes: 0
Reputation: 678
Try the following command
npm install -g grunt-cli@0 grunt-init bower amber-cli
Upvotes: 0