Error: ENOENT: no such file or directory, uv_cwd at Object.resolve (path.js:1184:25) at Function.Module._resolveLookupPaths (module.js:419:17) at Function.Module._resolveFilename (module.js:522:22) at Function.Module._load (module.js:476:23) at Module.require (module.js:568:17) at require (internal/module.js:11:18) at /usr/lib/node_modules/npm/bin/npm-cli.js:19:21 at Object.<anonymous> (/usr/lib/node_modules/npm/bin/npm-cli.js:92:3) at Module._compile (module.js:624:30) at Object.Module._extensions..js (module.js:635:10)
sh: highlight_alias.json: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! hexo-util@0.6.1 build:highlight: `node scripts/build_highlight_alias.js > highlight_alias.json` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hexo-util@0.6.1 build:highlight script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────┐ │ 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) /root/.config │ └───────────────────────────────────────────────────┘ npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/hexo-cli/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! hexo-util@0.6.1 postinstall: `npm run build:highlight` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hexo-util@0.6.1 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! /root/.npm/_logs/2017-10-12T06_48_32_607Z-debug.log
解决办法:
1 2
npm config set user 0 npm config set unsafe-perm true
3.只替换 hexo 和主题的配置文件报错
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Unhandled rejection TypeError: path.substring is not a function at Object.urlForHelper (/usr/local/hexo/MyBlog/node_modules/hexo/lib/plugins/helper/url_for.js:9:31) at wrapper (/usr/local/hexo/MyBlog/node_modules/lodash/lodash.js:4968:19) at Object.eval [as tpl] (eval at precompile (/usr/local/hexo/MyBlog/node_modules/swig/lib/swig.js:498:13), <anonymous>:125:119) at compiled (/usr/local/hexo/MyBlog/node_modules/swig/lib/swig.js:619:18) at Object.eval [as tpl] (eval at precompile (/usr/local/hexo/MyBlog/node_modules/swig/lib/swig.js:498:13), <anonymous>:320:125) at compiled (/usr/local/hexo/MyBlog/node_modules/swig/lib/swig.js:619:18) at Theme._View.View._compiled (/usr/local/hexo/MyBlog/node_modules/hexo/lib/theme/view.js:127:30) at Theme._View.View.View.render (/usr/local/hexo/MyBlog/node_modules/hexo/lib/theme/view.js:29:15) at /usr/local/hexo/MyBlog/node_modules/hexo/lib/hexo/index.js:390:25 at tryCatcher (/usr/local/hexo/MyBlog/node_modules/bluebird/js/release/util.js:16:23) at /usr/local/hexo/MyBlog/node_modules/bluebird/js/release/method.js:15:34 at RouteStream._read (/usr/local/hexo/MyBlog/node_modules/hexo/lib/hexo/router.js:134:3) at RouteStream.Readable.read (_stream_readable.js:443:10) at resume_ (_stream_readable.js:823:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)