1

我有一个问题啊..是这样开始的~

当我按下命令 - $ 'npm install -g hexo-cli' 时,错误如下。

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/usr/local/lib

npm ERR! Error: EACCES: permission denied, access        '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access    '/usr/local/lib/node_modules']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
4

1 回答 1

0

尝试

$ sudo npm install -g hexo-cli

在这里这里,您可以获得有关该错误的确切信息。

于 2020-02-15T13:53:15.413 回答