Does anyone know what's the difference between sudo npm install -g npm and sudo apt-get install npm?
Asked
Active
Viewed 3,477 times
1 Answers
1
The latter technically depends on your distribution. But chances are its an DEB package that installs npm including installing its dependence like nodejs and would be a full install like documentation and binaries not just javascript module.
The former installs a global scoped npm module along with its dependencies using the latter npm. This could theoretically replace the same module that the DEB installed but chances are certainly that this is not the case. Instead its npm module that exists as a managed package of the system npm probable in /usr/local/share/npm instead of /usr/share/npm.
jdwolf
- 2,270