発生している問題
Node.jsでFFIを使いたいのですが、npm install ffi
としたときに、
gyp Err: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
とのエラーが表示されます。
windows build toolsはインストール済みです。
環境
- Node 14.15.0
補足
- コメントにて、Nodeのバージョン自体が対応していない可能性があるとのご指摘をいただき、
The current version is tested to run on node v0.6, v0.8, v0.9 and v0.10.
と書いてあるので、試しにv0.10に落としてみましたがやはり、
gyp ERR! stack Error: `gyp` failed with exit code: 1
とエラーが表示されます。
The current version is tested to run on node v0.6, v0.8, v0.9 and v0.10.
ffi - npm とか、こんなIssue Unsupport for node 12.x #545 がCloseしていないので、Node.js本体の版数が未サポートなのかもしれません。Why does npm install ffi return error. Using node version 12ffi-napi
の方を試してみては? あるいはv10くらいまでのどこかの版数を試してみるとか、この辺の記事を参考にしてみるとか。Windows10にてNode環境構築によくあるエラー, Windowsでnpm installしてnode-gypでつまずいた時対処方法