gruntjs / grunt-cli

Grunt's command line interface.
http://gruntjs.com/
MIT License
706 stars 248 forks source link

can't install grunt OSX el capitan 10.11.5 #108

Closed v3nt closed 8 years ago

v3nt commented 8 years ago

have re-installed node / npm but now can't get grunt up and running.

node --version v4.4.4

npm --version 2.15.1

grunt --version -bash: grunt: command not found

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! nam  v2.15.1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! sys call spawn
npm ERR! roots@7.0.1 postinstall: `node node_modules/bower/bin/bower install && grunt dev`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the roots@7.0.1 postinstall script 'node node_modules/bower/bin/bower install && grunt dev'.
npm ERR! This is most likely a problem with the roots package,
npm ERR! not with nam itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/bower/bin/bower install && grunt dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs roots
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls roots
npm ERR! There is likely additional logging output above.
v3nt commented 8 years ago

OK - so it seems its now installed but i can't run it from terminal using just 'grunt'. I just 'npm install' in my projects and it ran grunt dev after and worked.

But when i try 'grunt dev' i still get '-bash: grunt: command not found'

this is what i got when i ran npm install -

macbook-ret:wonkhe-roots-master jynk$ nam install
> fsevents@1.0.9 install /Users/jynk/Projects/630_Wonkhe/web/wonkheweb/wp-content/themes/wonkhe-roots-master/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/jynk/Projects/630_Wonkhe/web/wonkheweb/wp-content/themes/wonkhe-roots-master/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> roots@7.0.1 postinstall /Users/jynk/Projects/630_Wonkhe/web/wonkheweb/wp-content/themes/wonkhe-roots-master
> node node_modules/bower/bin/bower install && grunt dev

Running "jshint:all" (jshint) task
>> 3 files lint free.
Arkni commented 8 years ago

But when i try 'grunt dev' i still get '-bash: grunt: command not found'

Because grunt is only installed locally. If you want to use the grunt command from anywhere on your system, run: npm i -g grunt-cli

v3nt commented 8 years ago

i have about 20 times! Tried with sudo too...

Arkni commented 8 years ago

Can you provide the output ?

v3nt commented 8 years ago

on a different machine but will try agin next week...

vladikoff commented 8 years ago

sounds like an issue with your script or npm.

v3nt commented 8 years ago

no it wasn't — it wasn't linked after install for some reason...