Error: EACCES: permission denied

后端 未结 23 2379
醉梦人生
醉梦人生 2020-11-29 19:04

I run npm install lodash but it throws Error: EACCES: permission denied error. I know it is permission issue but as far as I know, sudo permission

23条回答
  •  生来不讨喜
    2020-11-29 19:45

    node recommends executing following:

     sudo chown -R $USER:$(id -gn $USER) /home/venkatesh/.config
    

    If you execute

    npm config
    

    You will see something like this

    │                   npm update check failed                   │
    │             Try running with sudo or get access             │
    │            to the local update config store via             │
    │ sudo chown -R $USER:$(id -gn $USER) /home/venkatesh/.config │
    

    It worked for me.

提交回复
热议问题