Using "sudo" when installing NPM packages may put your computer at risk, by giving untrusted code administrative privileges. Please do not use "sudo" when installing NPM packages.
Instead, use the following instructions to allow NPM to install global packages without administrative privileges:
This work is licensed under a Creative Commons Attribution 4.0 International License.
Top comments (1)
Definitely, thanks for raising this. Using
sudois definitely an anti-pattern that may lead to security issues, as well as just mess up permissions on Unix-based operating systems.