dominictarr / npmd

MIT License
450 stars 37 forks source link

npmd does not respect the custom location for global installs #70

Closed binarykitchen closed 10 years ago

binarykitchen commented 10 years ago

Hey Dom

I have an Error: EACCES, mkdir '/usr/lib/node_modules/gulp' here when installing something with npmd

Because I have set a custom folder for npm global installs to avoid the sudo command.

According to https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os I did the following:

Optional: To avoid using sudo for global npm installs etc.: npm config set prefix ~/npm, add $HOME/npm/bin to $PATH, and append export PATH=$HOME/npm/bin:$PATH to your .bashrc.

Yeah ... could you tweak npmd so that it respects the configuration at npm config get prefix?

I think this is quite important since it renders all my npmd actions unusable and is recommended by Joyent ...

joeytwiddle commented 10 years ago

+1 I am using that install structure too, and it stopped me from using npmd here.

dominictarr commented 10 years ago

yes this is a good idea.

dominictarr commented 10 years ago

okay thanks to https://github.com/dominictarr/npmd-config/pull/5 the npmrc config file is now applied in the correct order, so this could now work correctly. can you confim?

dominictarr commented 10 years ago

oh - you'll need to install the latest npmd@1.2.10

clehner commented 10 years ago

I was encountering this issue in npmd@1.2.9 and it works correctly for me with npmd@1.2.11.

joeytwiddle commented 10 years ago

Working here so far. Great job, thanks!

binarykitchen commented 10 years ago

Good, works. Thx comrade!