安装aglio时遇到node-gyp rebuild

时间:2017-11-16 09:13:24

标签: npm node-gyp aglio

安装aglio时,遇到'node-gyp rebuild'问题

虽然我想安装aglio,但安装失败并出现以下错误。 你知道原因是什么吗?

的env

$ node -v
v8.4.0

$ npm -v
5.3.0

命令

npm install -g aglio

日志

$ npm install -g aglio
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
C:\Program Files (x86)\Nodist\bin\aglio -> C:\Program Files (x86)\Nodist\bin\node_modules\aglio\bin\aglio.js
npm WARN lifecycle The node binary used for scripts is C:\Program Files (x86)\Nodist\bin\node.exe but npm is using C:\Program Files (x86)\Nodist\v-x64\8.4.0\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> protagonist@1.6.8 install C:\Program Files (x86)\Nodist\bin\node_modules\aglio\node_modules\protagonist
> node-gyp rebuild


  win_delay_load_hook.cc
  libsundown.vcxproj -> C:\Program Files (x86)\Nodist\bin\node_modules\aglio\node_modules\protagonist\build\Release\\libsundown.lib
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\Nodist\npmv\5.3.0\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files (x86)\\Nodist\\v-x64\\8.4.0\\node.exe" "C:\\Program Files (x86)\\Nodist\\npmv\\5.3.0\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files (x86)\Nodist\bin\node_modules\aglio\node_modules\protagonist
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: protagonist@1.6.8 (node_modules\aglio\node_modules\protagonist):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: protagonist@1.6.8 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ aglio@2.3.0
added 1 package and updated 1 package in 33.407s

1 个答案:

答案 0 :(得分:0)

  1. python 2.7

  2. Visual C ++ 2015构建工具

  3. 配置

    • npm config set msvs_version 2015
    • npm config set python C:\ Python27 \ python.exe
    • npm install -g aglio