mac 安装hexo,提示npm WARN checkPermissions Missing write access
输入 $ npm install -g hexo
提示错误:
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/hexo
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
/usr/local/lib
└── hexo@3.2.0
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "hexo"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! path /usr/local/lib/node_modules/hexo
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/hexo'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/hexo']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/hexo' }
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! /Users/jason/npm-debug.log
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
npm说是,最好不要用root来执行,否则会很麻烦,请参考这个解决方法
请切换到root用户执行
$ sudo npm install -g hero-cli
输入上面命令安装就行了