LoginSignup
2
0

More than 3 years have passed since last update.

Node.js v12でnode-gypでのビルドが通らない場合、v10をインストールすればよい

Posted at

Node.js v12@Windowsでnode-gypを用いたビルドで以下のようなエラーが出る場合、v10をインストールすればビルドできます
※この例ではwinapiのビルドで失敗の例

v12ではnode-gyp v5.0.5が強制インストールされてしまうことに由来したエラーと睨んでいます。
※なお、MSBuild Toolの2015,2017,2019いずれでもv12ではうまくいきませんでした

gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\research\idle-poweroff\node_modules\winapi
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0