Error: EACCES: permission denied when trying to install ESLint using npm

后端 未结 8 1115
执念已碎
执念已碎 2021-01-29 23:59

I\'m trying to install ESLint with npm by going:

npm install -g eslint

However I get the following error:

Deans-Air:~ deangibso         


        
相关标签:
8条回答
  • 2021-01-30 00:57

    you can login as root using sudo su. First run the command sudo su on your terminal, then give your login password. Finally execute your expected command npm install -g eslint. It works for me.

    0 讨论(0)
  • 2021-01-30 00:57

    Just had the same error while running

    npm install -g @ionic/cli native-run cordova-res
    

    To fix, run the following

    sudo apt update
    sudo apt upgrade -y
    

    I had read the already present solutions but thought there was something else, UNSAFE isn't a safe keyword, lol. While running the command with the --unsafe-perm=true, I noticed it downloading what seemed to be update binaries. So, I updated and tried again.

    0 讨论(0)
提交回复
热议问题