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

后端 未结 8 1160
执念已碎
执念已碎 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:44

    Running the following command solved the issue for me while installing my packages.json :

     sudo npm install --unsafe-perm=true --allow-root
    

    To install only the package which caused the issue:

      sudo npm install -g --unsafe-perm=true --allow-root eslint
    

提交回复
热议问题