0%

hexo在macOS遇到的问题

安装hexo-cli报错

1
2
3
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

原因是因为没有权限
解决方法:先给目录赋予权限,再进行安装

1
2
sudo chown -R `whoami` /usr/local/lib/node_modules
npm install hexo-cli -g

运行hexo s报错,不造成影响

1
2
3
4
5
6
7
ERROR {
err: [Error: EISDIR: illegal operation on a directory, read] {
errno: -21,
code: 'EISDIR',
syscall: 'read'
}
} Plugin load failed: %s hexo-theme-landscape

解决方法:

1
rm -rf node_modules/hexo-theme-landscape