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/

ความคิดเห็น • 7

  • @Amike
    @Amike 3 ปีที่แล้ว +3

    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

  • @AndreyBondarenko1979
    @AndreyBondarenko1979 3 ปีที่แล้ว +2

    Thank you, Eric. This is so informative. Saved it in my bookmarks

  • @calculuslearner2176
    @calculuslearner2176 11 หลายเดือนก่อน +1

    I have switched to Linux before 2 years, started with Garuda Linux and then switched to arch linux

  • @sick-and-sour
    @sick-and-sour 2 ปีที่แล้ว +1

    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...

    • @ersgr
      @ersgr ปีที่แล้ว

      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!

    • @je2587
      @je2587 3 หลายเดือนก่อน

      @@ersgr any news on this?

  • @rituparnaw
    @rituparnaw ปีที่แล้ว

    Your npm auth token exposed