Manually pointing PATH to yeoman after install #430

chrisdl opened this Issue Sep 14, 2012 · 25 comments


None yet

7 participants

chrisdl commented Sep 14, 2012

Got the "There looks to be a problem with the install. :(" message and tried uninstalling, reinstalling cleaning npm cache etc.

Also tried installing with curl -L | bash and curl -L | sh and doing a manual install.

I think the issue might be that I use ZSH? I solved the issue by manually adding /usr/local/share/npm/lib/node_modules/yeoman/bin/ in my ~/.zshrc file.

Yeoman now seems to be working correctly.

Did I miss something obvious? Was there some other fix? What was causing the issue?


Afraid I'm not entirely sure what your issue is but I don't think it's specifically down to ZSH - I use ZSH and it worked fine for me.


ZSH working fine for me too. Closing for now, since we can't reproduce.

chrisdl commented Sep 14, 2012

I should maybe mention that i am not the only user of this computer, but I do have administrator access. So maybe the issue is with multi-user installs?


@chrisdl could you post up the results of the following?

echo $PATH

Might shed some light.

chrisdl commented Sep 15, 2012


Sure, check it out.

➜  ~  echo $PATH


➜  ~  echo $NODE_PATH



@chrisdl Okay, this is me completely guessing...

Maybe $NODE_PATH might be overriding your $PATH, which is why it couldn't find Yeoman. Could you try removing your $NODE_PATH, and adding:


To your $PATH, then try? This is on the verge of my shell knowledge so I am mainly guessing but you never know :P This is the set up I have and it works fine.

chrisdl commented Sep 16, 2012

edit: still wrong computer =( /edit

I don't have npm in /usr/local/share. Which I am guessing is weird.


What version of Node are you running? I just upgraded from Node 0.8.1 to 0.8.8 and it comes with npm now (which it didn't used to do, at least not through brew installs), which is why my npm is in that directory. What does

node -v
npm -v


chrisdl commented Sep 16, 2012

edit: still wrong comp /edit

~  node -v

~ npm -v

~ which npm

In that case, I'd recommend adding /usr/local/bin/npm to your $PATH, and getting rid of $NODE_PATH.

Then perhaps try installing something else globally and see if it works, eg:

npm install -g coffee-script
coffee -v
chrisdl commented Sep 16, 2012

I just realized I've had a serious brain fart (in my defence I am running a fairly high fever). I'm not on the computer which has yeoman installed on it right now. I will return to this computer tonight and will test all your awesome suggestions and provide my $PATHand $NODE_PATHon the correct computers.


Haha no worries :) I can't say with any confidence anything I've said might help, but might help narrow things down. Would be good to know if this is a Yeoman prob or your system set up. To be honest I suspect the later.

chrisdl commented Sep 16, 2012

Yeah I feel fairly certain something is simply not pointing to the right place. But I feel like my setup is fairly standard so I thought maybe yeoman install wasn't pointing something correctly, and that it was perhaps not just affecting me.

chrisdl commented Sep 16, 2012

Alright, back home now. PATH=/usr/local/bin:/usr/local/share/npm/lib/node_modules/yeoman/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin while ``$NODE_PATH` is empty

I have now replaced /usr/local/share/npm/lib/node_modules/yeoman/bin with /usr/local/share/npm/binwhich has had the odd effect of resetting my yeoman version from 0.9.1 to 0.9.0

When searching the computer for yeoman ~find / -name 'yeoman' i was found here:


The ~which npmcommand rendered /usr/local/bin/npm, but pointing my PATH at it did not help (since it wasn't a folder, only the npm executable).

I removed yeoman using ~sudo npm uninstall yeoman -g and reinstalled to see if problem was solved with 0.9.1 release. Installing with yeoman without the /usr/local/share/npm/bin in my PATH caused the yeoman command to not be found. I then tried to install coffee-script as per jackfranklins suggestion and found that downloading it was no issue but running it was an impossibility.

I thus conclude that the root cause of the issue seems to be that nothing in my paths are pointing at my npm modules. I re-added /usr/local/share/npm/bin to my PATH in my .zshrc file and all is now working like clockwork.


I re-added /usr/local/share/npm/bin to my PATH in my .zshrc file and all is now working like clockwork.

Awesome, glad you got it sorted.

@sindresorhus is it maybe worth compiling some form of "troubleshooting" document or similar for common issues like this that I imagine might crop up a few times? I'll happily fork & try to put one together if you think it might be beneficial.


Jack, can you add it to

Right now that's the easiest place to drop some documentation. Later on
we'll take whats there and turn it into a better resource.


@paulirish just saw that you added a bit to the wiki, I'm happy to add a bit more detail to that additional FAQ so I'll do a bit of editing later.


@jackfranklin Thanks :)


Ran into this issue as well and decided to ask isaacs on #node.js. Seems like there are two similar but separate issues:

  • It seems like Homebrew doesn't create the symlink in /usr/local/bin
  • If an existing Homebrew node installation exists, npm is not placed in /usr/local/bin when installing the node binary from the website.

So the two workarounds are:

  • Add /usr/local/share/npm/bin to $PATH
  • brew uninstall node and install the binary package

hth with the documentation. chat pasted below:

06:41:09 felideon | isaacs: any reason /usr/local/share/npm/bin would not be added to the path (mac 10.6.8) when installing the latest node binary (.pkg) from the website?
07:51:00 @isaacs | felideon: why is it /usr/local/share/npm/bin?
07:51:09 @isaacs | felideon: did you install npm from homebrew or something?
07:51:26 @isaacs | felideon: the node installer puts it right in /usr/local/bin, and assumes that's already in the PATH
08:41:57 felideon | isaacs: it seems like i had installed node (not npm) from homebrew at some point. not sure if that's how it made it there. but when I installed the node binary from the nodejs website, it didn't put it in /usr/local/bin
08:44:29 felideon | isaacs: ok so i did a 'brew uninstall node' and then re-installed the node binary, and npm is now at the right spot.

okonet commented Feb 1, 2013

Had the same problem installing node & npm using Homebrew. Solved by adding /usr/local/share/npm/bin to $PATH

bnvk commented May 13, 2013

Ok. I've added the following two lines to my .bash_profile on Mac OS and that eliminated the path not found issue

export PATH=/usr/local/share/npm/bin:$PATH

But I'm getting a strange error when I actually try to create an app with Yeoman. Any help would be greatly appreciated!

$ yo webapp
Error: EACCES, permission denied '/Users/brennannovak/.config/configstore'
    at Object.fs.mkdirSync (fs.js:483:18)
    at Function.sync (/usr/local/share/npm/lib/node_modules/yo/node_modules/insight/node_modules/configstore/node_modules/mkdirp/index.js:55:12)
    at readFile (/usr/local/share/npm/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
    at Object.create.all.get (/usr/local/share/npm/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:36:22)
    at Object.Configstore (/usr/local/share/npm/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:30:40)
    at new Insight (/usr/local/share/npm/lib/node_modules/yo/node_modules/insight/lib/insight.js:20:16)
    at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/yo/bin/yo:22:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)

UPDATE: As suggested I ran $ brew uninstall node and then reinstalled via the installer on and then upon installing Yeomin I ran into a permission error with simple

$ npm install yo

So trying with

$ sudo npm install yo

It seemed to work, but now to run $ yo webapp runs into the same permissione error as above, but upon running $ sudo yo webapp it created the project, but it installed EVERYTHING into the local /node_modules folder and everything is owned by root... #argh #wish-I-was-better-at-CL-things


@brennannovak Yeoman don't have permission to that folder and throws. sudo chown -R $USER /Users/brennannovak/.config might do the trick.

bnvk commented May 13, 2013

Ah yes, that did the trick, thanks @sindresorhus :) However running

$ yo webapp 

Seems to install bower and about 20+ grunt modules into the local /node_modules folder instead of finding them in the gobal. Is this correct behavior?

ghost commented May 29, 2015

Hey ! I had the same trouble !
I used :
And it pretty worked for me !! 👯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment