Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Currently NPM expects unprivileged users to have access to /usr/local, and a lot of node tutorials encourage global repermissioning of this directory, which is Bad Unix

NPM reminds you do "sudon't" if you run it as root.

Configuring it to use ~/.node_modules is not very straight forward or obvious but once you do it everything would work with an unprivileged user and without messing up Unix.



> NPM reminds you do "sudon't" if you run it as root.

To install NPM itself, you either get a bunch of 'sudont' errors or have the app fail with the normal, secure /usr/local permissions when it can't write there.

Try it.


I ran into this a few days ago. I ended up reinstalling node with a prefix of ~/local, and then when I built npm it automatically used the same prefix.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: