使用npm安装hexo-cli权限阻止

  安装hexo-cli的时候尽管是使用sudo依然报权限不足。

  使用如下命令安装hexo-cli:

1
sudo npm install hexo-cli -g

  错误信息如下:

1
2
3
4
5
6
7
8
9
...
> node scripts/install.js
sh: 1: node: Permission denied
...
> npm run build:highlight
sh: 1: npm: Permission denied
...

  解决办法如下:

1
npm config set unsafe-perm true

2017-7-21 于 成都

文章目录