3 ms·
The -g option in NPM means "install globally" (i.e. system wide) instead of in this projects modules directory. You will always need root privs for that, for an
by dspillett 13y ago
The -g option in NPM means "install globally" (i.e. system wide) instead of in this projects modules directory. You will always need root privs for that, for any module.
Without the -g option sudo is usually not required.
- mAritz 13y agoThat depends on how you install your node/npm. For nvm installs the default is ~/.npm which doesn't require root privileges but is user specific.