我尝试在我的计算机上安装 nativefier,但是终端上出现错误:
npm ERR! Linux 4.15.0-43-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "nativefier" "-g"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/lenovo/npm-debug.log
答案1
您可以尝试迁移到旧版本的节点,然后重新尝试安装它。根据此文档,这不是 Ubuntu 18.04 的一个罕见问题 -https://github.com/nodejs/node/issues/19348。