Note that there are some explanatory texts on larger screens.

plurals
  1. POGrunt install error/s: "should be installed with -g"
    text
    copied!<p>I'm trying to install Grunt on my machine. I have read some <a href="http://coding.smashingmagazine.com/2013/10/29/get-up-running-grunt/" rel="nofollow">tutorials</a> and followed the <a href="http://gruntjs.com/getting-started" rel="nofollow">installation docs</a>, but I can't get it working.</p> <p>The CLI installs ok using this command:</p> <pre><code>sudo npm install -g grunt-cli </code></pre> <p>When I select a local directory (containing the package.json and Gruntfile) and <code>npm install</code>, I see the following message:</p> <pre><code>npm WARN prefer global grunt-cli@0.1.9 should be installed with -g </code></pre> <p>Why is this happening? I did install with <code>-g</code> - meaning 'globally', I understand.</p> <p>After this, it seems that I cannot run grunt, eg:</p> <pre><code>$ grunt -bash: grunt: command not found $ grunt --version -bash: grunt: command not found </code></pre> <p>How can I fix this? What am I missing?</p> <p>Here is my full log:</p> <pre><code>$ sudo npm install -g grunt-cli Password: npm http GET https://registry.npmjs.org/grunt-cli npm http GET https://registry.npmjs.org/grunt-cli npm http GET https://registry.npmjs.org/grunt-cli npm http GET https://registry.npmjs.org/nopt npm http GET https://registry.npmjs.org/findup-sync npm http GET https://registry.npmjs.org/resolve npm http GET https://registry.npmjs.org/nopt npm http GET https://registry.npmjs.org/findup-sync npm http GET https://registry.npmjs.org/resolve npm http GET https://registry.npmjs.org/nopt npm http GET https://registry.npmjs.org/findup-sync npm http GET https://registry.npmjs.org/resolve npm http GET https://registry.npmjs.org/abbrev npm http GET https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/lodash npm http GET https://registry.npmjs.org/abbrev npm http GET https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/lodash npm http GET https://registry.npmjs.org/abbrev npm http GET https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/lodash npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund /Users/tonyMac/.node/bin/grunt -&gt; /Users/tonyMac/.node/lib/node_modules/grunt-cli/bin/grunt grunt-cli@0.1.10 /Users/tonyMac/.node/lib/node_modules/grunt-cli ├── resolve@0.3.1 ├── nopt@1.0.10 (abbrev@1.0.4) └── findup-sync@0.1.2 (lodash@1.0.1, glob@3.1.21) Tonys-iMac:~ tonyMac$ cd projects/testingGrunt Tonys-iMac:testingGrunt tonyMac$ npm install npm WARN prefer global grunt-cli@0.1.9 should be installed with -g </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload