win10系统使用npm安装hexo失败,求解答?

新手上路,请多包涵

在win10系统下,使用npm安装hexo失败
git和node.js都是最新版本
日志如下

$ npm install hexo-cli -g
C:\Users\leebr\AppData\Roaming\npm\hexo -> C:\Users\leebr\AppData\Roaming\npm\node_modules\hexo-cli\bin\hexo

> dtrace-provider@0.8.5 install C:\Users\leebr\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\dtrace-provider
> node scripts/install.js

'node' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒

> hexo-util@0.6.1 postinstall C:\Users\leebr\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\hexo-util
> npm run build:highlight

'npm' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
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":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.8.5 (node_modules\hexo-cli\node_modules\dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.8.5 install: `node scripts/install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

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!     C:\Users\leebr\AppData\Roaming\npm-cache\_logs\2017-09-02T08_20_10_072Z-debug.log

阅读 4.2k
1 个回答

npm 拉不到依赖模块导致!两者方法:

  1. 安装cnpm,使用cnpm安装;
  2. 替换npm 默认源,找到.npmrc 文件,编辑registry = https://registry.npm.taobao.org
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题