Why You Should Never Run "sudo npm"...
ฝัง
- เผยแพร่เมื่อ 23 ส.ค. 2024
- Please don't give random JavaScript code root access to your machine. Getting weird permission errors when you're trying to npm install --global some packages on Linux? Watch this video and learn how to install packages globally with NPM with no root access needed...
ericmurphy.xyz/
This is super helpful, I wondered why people said not to run it with sudo, but didn't know how to make it work without it
Thank you, Eric. This is so informative. Saved it in my bookmarks
I have switched to Linux before 2 years, started with Garuda Linux and then switched to arch linux
I'm new to Linux, and I accidentally type sudo in the installation command, is there any way to revert or uninstall or something to prevent whatever will happen later??
I just found out about the do not do sudo npm...
I would love to confirm this as well because I did the same exact thing as you . What worked for me (I think) was running 'npm list -g' in the CL to see what was installed and where. Then just doing the opposite of the install - 'sudo npm -g uninstall npm' , so on and so forth until you get rid of all of the sudo installed npm packages. Again, would also love some confirmation that this is actually the way to do this!
@@ersgr any news on this?
Your npm auth token exposed