Electron JS install error - Error: EACCES: permission denied

后端 未结 4 1481
礼貌的吻别
礼貌的吻别 2021-01-14 07:00

getting error while installing ElectronJS,

Error:

Error: EACCES: permission denied, mkdir \'/usr/lib/node_modules/electron/.electron\'
4条回答
  •  清歌不尽
    2021-01-14 07:28

    Solved my issue by appending --unsafe-perm=true

    command:

    sudo npm install -g electron --unsafe-perm=true
    

    unsafe-perm

    Default: false if running as root, true otherwise

    Type: Boolean Set to true to suppress the UID/GID switching when running package scripts. If set explicitly to false, then installing as a non-root user will fail.

提交回复
热议问题