Error: EACCES: permission denied

后端 未结 23 2385
醉梦人生
醉梦人生 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:53

    FWIW I had the same symptoms, but with a different package. Creating package.json and running npm init did NOT solve my issue.

    On this system, apparently new folders in this location were being created with root permissions. During npm install, new folders are created. This caused npm install to fail partway, even with sudo.

    The solution was to run npm install app in a different location with no root umask.

提交回复
热议问题