4 ms·
> Currently NPM expects unprivileged users to have access to /usr/local, and a lot of node tutorials encourage global repermissioning of this directory, which i
by hasenj 16y ago
> 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.
- nailer 16y ago> 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.
- mnutt 16y agoI 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.