Skip to content

Loading…

Unable to find local grunt #1

Closed
MattiSG opened this Issue · 4 comments

2 participants

@MattiSG

Hi,

If I follow the installation instructions, here is what I end up with:

› grunt install
grunt-cli: The grunt command line interface. (v0.1.11)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide

I also tried doing an npm install manually, that didn't change anything.

@gillesfabio
Owner

Hi @MattiSG,

Thanks for reporting this bug.

I updated the installation process. Please, now use make init instead of grunt install.

@MattiSG

This did unlock some things, but there still seems to be issues :-$
Here is my complete (cleaned-up) history since my previous installation try.

∵ MESH-M.local Documents/soja [master] ⦑ 09:28:57
› git pull
e43365f..6a34894  master     -> origin/master
[…]
∵ MESH-M.local Documents/soja [master] ⦑ 10:50:16 
› make init
npm install
[…]
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR! cb() never called!
npm ERR! not ok code 0
make: *** [init] Error 1
∵ MESH-M.local Documents/soja [master] ⦑ 10:50:43   2 
› grunt server
grunt-cli: The grunt command line interface. (v0.1.11)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide
∵ MESH-M.local Documents/soja [master] ⦑ 10:51:02   99 
› sudo npm uninstall -g grunt-cli
unbuild grunt-cli@0.1.11
∵ MESH-M.local Documents/soja [master] ⦑ 10:51:15 
› sudo npm uninstall -g grunt
unbuild grunt@0.4.1
∵ MESH-M.local Documents/soja [master] ⦑ 10:51:18 
› grunt server
-bash: /usr/local/share/npm/bin/grunt: No such file or directory
∵ MESH-M.local Documents/soja [master] ⦑ 10:51:21   127 
› make init
npm install
[npm stuff…]
npm http 304 https://registry.npmjs.org/underscore
grunt@0.4.1 node_modules/grunt
bower install
[bower stuff…]
gem install compass
Successfully installed compass-0.12.2
1 gem installed
∵ MESH-M.local Documents/soja [master] ⦑ 10:58:17 
› grunt server
-bash: /usr/local/share/npm/bin/grunt: No such file or directory
∵ MESH-M.local Documents/soja [master] ⦑ 10:58:35   127 
› sudo npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
[npm stuff…]
∵ MESH-M.local Documents/soja [master] ⦑ 10:59:03 
› grunt server
Loading "express.js" tasks...ERROR
>> Error: Cannot find module 'temp'
Warning: Task "express:app" not found. Use --force to continue.

Aborted due to warnings.
∵ MESH-M.local Documents/soja [master] ⦑ 10:59:09   3 
› make init
npm install
npm WARN excluding symbolic link node_modules/jsdoc -> ../lib/jsdoc
npm WARN prefer global grunt-cli@0.1.11 should be installed with -g
npm ERR! Error: EPERM, chmod '/Users/matti/Documents/soja/node_modules/grunt-cli/bin/grunt'
npm ERR!  { [Error: EPERM, chmod '/Users/matti/Documents/soja/node_modules/grunt-cli/bin/grunt']
npm ERR!   errno: 50,
npm ERR!   code: 'EPERM',
npm ERR!   path: '/Users/matti/Documents/soja/node_modules/grunt-cli/bin/grunt' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 12.5.0
npm ERR! command "/usr/local/Cellar/node/0.10.19/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/matti/Documents/soja
npm ERR! node -v v0.10.19
npm ERR! npm -v 1.3.11
npm ERR! path /Users/matti/Documents/soja/node_modules/grunt-cli/bin/grunt
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, chmod '/Users/matti/Documents/soja/node_modules/grunt-cli/bin/grunt'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/matti/Documents/soja/npm-debug.log
npm ERR! not ok code 0
make: *** [init] Error 50
∵ MESH-M.local Documents/soja [master]⊛ ⦑ 10:59:21   2 
@gillesfabio
Owner

It seems that grunt-cli has been installed into node_modules with root privileges. Did you try to delete the node_modules directory and re-execute the make init?

rm -rf node_modules
sudo npm uninstall -g grunt-cli
sudo npm install -g grunt-cli
make init
@MattiSG

Ok, that seemed to do the trick :)

@MattiSG MattiSG closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.