0

I've seen the post "NPM modules won't install globally without sudo" and followed the accepted answer, but I'm pretty sure it's not done anything other than cause further problems.

I have an unknown number of global NPM modules already installed. That link above seems as if it's a partial solution. IOW, future modules won't have a problem, but NPM/node will have no idea where the old stuff was.

During node's initial install, how could I have somehow prevented NPM/node module install from needing root/admin access?

Community
  • 1
  • 1
monsto
  • 1,178
  • 1
  • 13
  • 26

1 Answers1

0

Yes, theoretically you could, but then chances are that only the user used for installation could access / run node.

You might get along with a few sudoers entries, or opt for reduced functionality (as you could not actually use modules that need root access anyway, like opening ports below 1024 et cetera).