1

I cannot get the Yeoman setup working for the life of me.

When I attempt to run the following:

Aidans-MacBook-Pro:~ aidan$ npm install --global yo bower grunt-cli

However I end up getting the following (and when I try to check the versions, only Yeoman seems to be installed):

npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN checkPermissions Missing write access to /Users/aidan/.npm-packages/lib/node_modules/bower
- minimatch@3.0.0 node_modules/yo/node_modules/glob/node_modules/minimatch
- lru-cache@2.7.3 node_modules/yo/node_modules/minimatch/node_modules/lru-cache
- sigmund@1.0.1 node_modules/yo/node_modules/sigmund
/Users/aidan/.npm-packages/lib
├── bower@1.7.7 
├── grunt-cli@0.1.13 
└─┬ yo@1.7.0 
  └─┬ yeoman-doctor@2.1.0
    └─┬ twig@0.8.9 
      └── minimatch@3.0.0 

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/Users/aidan/.node/bin/npm" "install" "--global" "yo" "bower" "grunt-cli"
npm ERR! node v4.4.0
npm ERR! npm  v3.8.1
npm ERR! path /Users/aidan/.npm-packages/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/Users/aidan/.npm-packages/lib/node_modules/bower'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access '/Users/aidan/.npm-packages/lib/node_modules/bower']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/Users/aidan/.npm-packages/lib/node_modules/bower' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/aidan/npm-debug.log
Aidans-MacBook-Pro:~ aidan$ yo --version
1.7.0
Aidans-MacBook-Pro:~ aidan$ bower --version
-bash: bower: command not found
Aidans-MacBook-Pro:~ aidan$ grunt --version
-bash: grunt: command not found
Aidans-MacBook-Pro:~ aidan$ 

I’ve already tried this guide, but have had no luck: https://gist.github.com/DanHerbert/9520689

Using Mac OS X El Capitan 10.11.3

Could somebody assist me in figuring out why I’m unable to get this working, and how to fix it? It would be much appreciated.

  • From output „Please try running this command again as root/Administrator” – run `sudo npm install --global yo bower grunt-cli` – Krzysztof Safjanowski Mar 19 '16 at 13:48
  • Done. Was able to get yeoman installed, however I'm getting “bower/grunt: command not found” still. I tried installing them individually as well with sudo, but still no luck (even though they seem to install fine). – AidanParker Mar 19 '16 at 14:01
  • grunt-cli should be installed globally and grunt locally into project. bower should be installed globally – Krzysztof Safjanowski Mar 19 '16 at 14:29

2 Answers2

1

Fixed the problem.

Completely uninstalled Node/NPM/etc by following this: How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

Then installed Node.js through the installer, and then followed this page (video too): https://docs.npmjs.com/getting-started/fixing-npm-permissions

THEN started the Yeoman tutorial. All is working now!

Community
  • 1
  • 1
0

You run into permissions issues. As issues shows up in the form of EACCESS errors during your installation process. Refer to the npm guide to fix permissions.

Govind Sah
  • 116
  • 10
  • Following the first response, I was able to get Yeoman installed, and although I apparently can install bower and grunt, I’m getting “Bower/Grunt: command not found” when I try to check their versions. – AidanParker Mar 19 '16 at 14:03
  • Have a close look at http://yeoman.io/codelab/setup.html where its clearly mentioned to not use sudo as a work-around, so you can consult [this guide](https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md) for a more robust solution – Govind Sah Mar 19 '16 at 14:22
  • I am so lost with all of this. I followed that guide, and then followed this one to make sure I had a fresh start: https://gist.github.com/DanHerbert/9520689, however now I can't even get Yeoman to work let alone the other two. How can I completely start over and restart this doing it correctly? – AidanParker Mar 19 '16 at 14:49