TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
451 stars 141 forks source link

Problems with Visual Studio 2019 #123

Closed ziogoku closed 4 years ago

ziogoku commented 4 years ago

Hi, I have a project that uses ref, this project was build when I had Visual Studio 2017. Now I have Visual Studio 2019 in a new workstation and the project can't run because ref fail:, this is the stack:

gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\Vins\AppData\Roaming\npm\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.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Vins\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\Progetti\NodeJs\Test\Test\node_modules\ref gyp ERR! node -v v12.13.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm WARN test@0.0.0 No repository field. npm WARN test@0.0.0 No license field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ref@1.3.5 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ref@1.3.5 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

my node-gyp version is v6.0.1 I need to install also 2017 and set msbuild_path there to work fine?

Thank you

adamrdrew commented 4 years ago

I have this same issue and am unsure how to resolve it:

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\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:\Users\adamr\Development\ffi\node_modules\ref
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
ziogoku commented 4 years ago

Solved using ref-napi instead of ref.