node.js - 输入命令 -$ npm install -g hexo-cli

标签 node.js hexo

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

当我按下命令 - $ '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:

最佳答案

尝试使用

$ sudo npm install -g hexo-cli

Herehere您拥有有关该错误的确切信息。

关于node.js - 输入命令 -$ npm install -g hexo-cli,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35647665/

相关文章:

node.js - 如何在 Hexo 中创建分页系统

node.js - 如何配置 pm2 来运行 hexo?

javascript - 如何在jade中编写javascript block ?

javascript - Nodejs : Accessing file after writing it to the hd yields error. 为什么?

github-pages - Hexo 的 repo 设置?

Hexo:你如何改变语言?

javascript - 如何获取 Hexo 文章循环 "for each"中的索引号?

javascript - 如何在单个快速服务器文件中使用两个单独的 Passport 实例

node.js - 向 Node.js 中的本地主机 smtp 服务器发送电子邮件

node.js - Node js 的 ssh2 中的客户端方法 "exec"是否有同步等效项?