> node scripts/build_highlight_alias.js > highlight_alias.json
npm ERR! Callback called more than once.
┌───────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /var/root/.config │
└───────────────────────────────────────────────────────┘
npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! [email protected] postinstall: `npm run build:highlight`
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/2017-09-09T09_48_52_309Z-debug.log
1
grimpil 2017-09-09 18:48:06 +08:00 via Android
方框里说得很清楚了吧
|
2
Phariel 2017-09-09 18:52:14 +08:00 via Android
权限不够
|
3
thomaswang OP @Phariel 那该怎么做呢
|
4
thomaswang OP @grimpil 挺清楚的 该怎么解决呢
|
5
Trim21 2017-09-09 22:10:05 +08:00
sudo chown -R $USER:$(id -gn $USER) /var/root/.config
|
6
levinit 2017-09-14 23:20:22 +08:00
>Workaround 1 (safer)
$ sudo chown -R user /usr/lib/node_modules $ npm i -g hexo-cli as user $ sudo chown -R root /usr/lib/node_modules >Workaround 2 (less safe) # npm config set user 0 # npm config set unsafe-perm true (unsafe-perm) # npm install -g hexo 如果你使用 archlinux 或者基于 arch 的发行版,你可以使用 yaourt -S nodejs-hexo-cli |
7
danhoo 2017-09-22 14:30:04 +08:00
npm config set user 0
npm config set unsafe-perm true |