You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[solved] Using Visual C++ Build Tools 2015 – standalone C++ tools #802
1 Your OS MUST be Windows
2 Check that python is in your path by writting python --version in the console. If not then
2.1 Download python 2.7 (I recommend chocolatey (choco install python2 -y))
3. Are you on Windows 7? Then follow the rest of 3.x
3.1 Check that you have .NET 4.5.1+ installed. If not then
3.2 Download and install .NET 4.5.1 (.NET 4.5.2 will also work just fine)
4 Download Microsoft Visual C++ Build Tools 2015 Technical Preview
4.1 Install the Windows 8.1 SDK if you haven't already. Note; I recently updated to Windows 10 and had to install the Windows 10 SDK before node-gyp would successfully build. 5 Set the npm config variable msvs_version to 2015: npm config -g set msvs_version 2015
6 Do npm i in what-ever project with node-gyp as a dependency without seeing weird error messages 👍
Reacted by Flavio Medeiros, Ersin Tarhan, zjaml, Demi Sauce, Mayura Devani, Ferdinand Mütsch, Simon Henrotte, Varun Garg, Cherry Wang, saqlain5544 and 12 more
Reacted by Mayura Devani
Reacted by Qwerty (Vítězslav Ackermann Ferko) and Mayura Devani
Adding C:\Program Files (x86)\MSBuild\14.0\Bin to my PATH yields no result. Still getting:
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location o f the component to the system path if it is installed elsewhere. [C:\Users\dotnet\Projects\firefund-cli\node_modules\utf-8-validate\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
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\dotnet\Projects\firefund-cli\node_modules\utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate Exit status 1
thx @mousetraps. Unfortunately I'm not sure how to tell node-gyp to use MSBuild.exe.
You comment prompted me to try just compiling a project via npm install.
I've set npm config set msvs_version 2015 --global but didn't set python as python --version already gives me 2.7.10.
I saw that you successfully compiled utf-8-validate so I cloned that repo and did npm i. The result was not very encouraging: c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\utf-8-validate\b uild\validation.vcxproj]
> utf-8-validate@1.2.1 install C:\Users\dotnet\Projects\playground\utf-8-validate
> node-gyp rebuild
C:\Users\dotnet\Projects\playground\utf-8-validate {git}
{lamb} if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or Platfo rmToolset may be set to an invalid version number. [C:\Users\dotnet\Projects\playground\utf-8-validate\build\validation.vcxproj]
validation.cc
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\utf-8-validate\b uild\validation.vcxproj]
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
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\dotnet\Projects\playground\utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the utf-8-validate@1.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the utf-8-validate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls utf-8-validate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\dotnet\Projects\playground\utf-8-validate\npm-debug.log
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or Platfo rmToolset may be set to an invalid version number. [C:\Users\dotnet\Projects\playground\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
bufferutil.cc
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\ws\node_modules\ bufferutil\build\bufferutil.vcxproj]
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or Platfo rmToolset may be set to an invalid version number. [C:\Users\dotnet\Projects\playground\ws\node_modules\utf-8-validate\build\validation.vcxproj]
validation.cc
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\ws\node_modules\ utf-8-validate\build\validation.vcxproj]
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
Hmm.. I somehow thought I could get things compiling without a Windows SDK but in the end I installed Windows 8.1 SDK via the installer and things seems to be working. 🎉
changed the title [-]Using Visual C++ Build Tools 2015 – standalone C++ tools[/-][+][solved] Using Visual C++ Build Tools 2015 – standalone C++ tools[/+]on Nov 12, 2015
@dotnetCarpenter
Hi. Installed the Build Tools 2015 provided by @mousetraps, followed instructions, tried to install selenium-webdriver (node-gyp dependant) and got the error below. Any ideas? (nodejs 4.2.2, npm 3.4, windows 10x64)
Thank you!
C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not fi
nd WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versio
n number. [C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate\build\validat
ion.vcxproj]
validation.cc
c:\users\rickm.node-gyp\4.2.2\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No
such file or directory [C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate
\build\validation.vcxproj]
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:\Users\rickm\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: node-gyp rebuild
npm WARN install:utf-8-validate@1.2.1 Exit status 1
warning MSB8003: Could not find WindowsSDKDir variable from the registry.
Looks like you're missing the Windows 10 SDK, since you are on Windows 10. I think you can uninstall Windows SDK 8.1. Let me know if it works and I'll update the guide to be more clear.
I have installed the windows 10 SDKs but somehow I think it failed to add it to the registry (or something like that), but I don't know how to fix it...
@dotnetCarpenter I finally got it working checking BOTH windows 10 SDKs and windows 8 SDK (I'm on win10) when installing the 2015 build tools. It seems that somehow the windows 10 SDKs is built on top of the windows 8 SDKs OR the windows 10 SDKs package has a bug that fails to add the correspondent registry values, and my system is simple using the windows 8 SDKs (when I added it later).
@Almusamim you're running in to our __pfnDliNotifyHook2 problem which has been covered pretty extensively on this issue tracker (not that I'm suggesting it's easy to identify!). In order to use the latest release of Visual Studio 2015 you need to get the latest version of node-gyp which comes with the latest v2 and v3 releases of npm. You should be able to run npm i npm@latest -g to get the latest version. Our next v6 release of Node.js should come with this too.
Reacted by Dave Lesage, Paul Gualotuna and Liming Jin
I am new to node js. I am running into the node-gyp errors this article described. My OS is Win8.1 and I have followed all the instructions but Step6/ in your guide at the beginning.
Can you explain what do you mean by "Do npm i in what-ever project with node-gyp as a dependency without seeing weird error messages"?
For example, currently, after I have performed your step 1-5, I used this command, "npm install -g TheApp". How do I incorporate your step 6 into this install command?
BTW, I have errors related to kerberos when I used the above generic install command which then led to the same node-gyp errors shown in this article.
Also, I did not install node-gyp separately, the app I tried to install w/o success seemed to install this module.
When I look at the user/appdata/roaming folder, node-gyp is created in a separate .node-gyp folder and not within the subfolder of npm/modules folders inside roaming. Is that (strange location of .node-gyp folder) normal?
Should I install node-gyp module (globally) to eradicate these errors?
Step 6 means everything is done and there should be no errors. If you are getting something else I'd file another bug. Kerberos errors suggest you might need proxy authentication to download stuff, I think this is out of scope of node-gyp
Thank you all for paticipating the discussion and share your insights.
I also met the problem while installing a native node module, and eventually, just solved it by installing Visual C++ Build Tool from npm-gyp official documents Microsoft's Node.js Guidelines for Windows, by which installed
Windows 8.1 SDK
(althought I'm using Windows 10, an error message indicated the missing of 8.1 SDK )
.NET Framework SDK.
I also installed the other two, but I'm not sure if they were neccessary, which are
Windows 10 SDK
ATL/MFC SDK.
With other issues like Python version and PATH settings addressed, npm started to work normally.
Just like WillingAC, I also followed the official document from Microsoft's Node.js Guidelines for Windows, but I am still having problems when I tried to compile the Couchbase SDK for node (couchnode). The errors I ran into are:
After some Google searches, I found that I needed to link to WS2_32.Lib. I checked the SDK folder under C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86 (and x64) and the file is there. So, somehow npm-gyp just couldn't pass the location to msbuild. I also tried setting an environment variable ILink_LibraryPath and pointed it to WS2_32.Lib before compiling the module, but it didn't help. I am at lost!
@toyssamurai You should report that to the maintainers of the couchbase module, it's not a node-gyp issue. Make sure you're using the latest version, it might have been fixed already.
I tired to find the MS standalone compiler, but when I opened the link it says the account expired. Is there any other link to download MS C++ standalone compiler.
I did all the tasks described above to recompile node-java, in order to install node-jdbc. But I sill fail, even though I did all the described measures above: installed python, have .Net 4.5.1, installed Visual Studio 2015, installed Build Tools, set "npm config -g set msvs_version 2015" and also tried many other measures described in other threads.
But, when I try to recompile node-java, I get the following error message:
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:\EigeneProgramme\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\EigeneProgramme\nodejs\node.exe" "C:\EigeneProgramme\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Workspaces\Lehre\WE2\node-jdbc-example-master\node_modules\jdbc\node_modules\java
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.8.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.8.0 install 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:
Has anybody an idea, what else I can do? Thanks for your help in advance!
John
Activity
dotnetCarpenter commentedon Nov 6, 2015
Adding
C:\Program Files (x86)\MSBuild\14.0\Binto my PATH yields no result. Still getting:Need to tell
node-gypto useMSBuild.exemousetraps commentedon Nov 10, 2015
@dotnetCarpenter hey, thanks for trying it out! Did you end up getting it working? Is there anything missing from these steps? #629 (comment)
dotnetCarpenter commentedon Nov 11, 2015
thx @mousetraps. Unfortunately I'm not sure how to tell node-gyp to use MSBuild.exe.
You comment prompted me to try just compiling a project via
npm install.I've set
npm config set msvs_version 2015 --globalbut didn't set python aspython --versionalready gives me2.7.10.I saw that you successfully compiled
utf-8-validateso I cloned that repo and didnpm i. The result was not very encouraging:c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\utf-8-validate\b uild\validation.vcxproj]Got .Net 4.5.2 :
Release DWORD 5cbf5 (379893)Entire output:
mousetraps commentedon Nov 11, 2015
Did you install the Windows sdk too when installing the build tools (this should be the default)? I believe that's where winsock2.h comes from.
dotnetCarpenter commentedon Nov 11, 2015
I get a similar errors when building ws.
mousetraps commentedon Nov 11, 2015
@dotnetCarpenter Even after installing the Windows sdk?
dotnetCarpenter commentedon Nov 12, 2015
Should I install the Windows 8.1 SDK with the Build Tools installer or the Windows 7 SDK when I'm on Windows 7?
Unfortunately I can not update to Windows 10 due to an unknown installation error when upgrading.
dotnetCarpenter commentedon Nov 12, 2015
Hmm.. I somehow thought I could get things compiling without a Windows SDK but in the end I installed Windows 8.1 SDK via the installer and things seems to be working. 🎉
OS: Windows7
Node: 5.0.0
Npm: 3.3.6
[-]Using Visual C++ Build Tools 2015 – standalone C++ tools[/-][+][solved] Using Visual C++ Build Tools 2015 – standalone C++ tools[/+]rickmed commentedon Nov 15, 2015
@dotnetCarpenter
Hi. Installed the Build Tools 2015 provided by @mousetraps, followed instructions, tried to install selenium-webdriver (node-gyp dependant) and got the error below. Any ideas? (nodejs 4.2.2, npm 3.4, windows 10x64)
Thank you!
C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not fi
nd WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid versio
n number. [C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate\build\validat
ion.vcxproj]
validation.cc
c:\users\rickm.node-gyp\4.2.2\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No
such file or directory [C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate
\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exefailed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install:
node-gyp rebuildnpm WARN install:utf-8-validate@1.2.1 Exit status 1
dotnetCarpenter commentedon Nov 15, 2015
Looks like you're missing the Windows 10 SDK, since you are on Windows 10. I think you can uninstall Windows SDK 8.1. Let me know if it works and I'll update the guide to be more clear.
Also, be sure to:
3.1 Check that you have .NET 4.5.1+ installed. If not then
3.2 Download and install .NET 4.5.1 (.NET 4.5.2 will also work just fine)
rickmed commentedon Nov 15, 2015
I have installed the windows 10 SDKs but somehow I think it failed to add it to the registry (or something like that), but I don't know how to fix it...
dotnetCarpenter commentedon Nov 15, 2015
Run the
VisualCppBuildTools_Full.exethat you downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=49512 and choose Repair.rickmed commentedon Nov 19, 2015
@dotnetCarpenter I finally got it working checking BOTH windows 10 SDKs and windows 8 SDK (I'm on win10) when installing the 2015 build tools. It seems that somehow the windows 10 SDKs is built on top of the windows 8 SDKs OR the windows 10 SDKs package has a bug that fails to add the correspondent registry values, and my system is simple using the windows 8 SDKs (when I added it later).
dotnetCarpenter commentedon Nov 21, 2015
sounds weird. perhaps @mousetraps has an idea to why.
53 remaining items
rvagg commentedon Jul 15, 2016
@Almusamim you're running in to our __pfnDliNotifyHook2 problem which has been covered pretty extensively on this issue tracker (not that I'm suggesting it's easy to identify!). In order to use the latest release of Visual Studio 2015 you need to get the latest version of node-gyp which comes with the latest v2 and v3 releases of npm. You should be able to run
npm i npm@latest -gto get the latest version. Our next v6 release of Node.js should come with this too.sorcererstone commentedon Sep 12, 2016
@ dotnetCarpenter
I am new to node js. I am running into the node-gyp errors this article described. My OS is Win8.1 and I have followed all the instructions but Step6/ in your guide at the beginning.
Can you explain what do you mean by "Do npm i in what-ever project with node-gyp as a dependency without seeing weird error messages"?
For example, currently, after I have performed your step 1-5, I used this command, "npm install -g TheApp". How do I incorporate your step 6 into this install command?
BTW, I have errors related to kerberos when I used the above generic install command which then led to the same node-gyp errors shown in this article.
Also, I did not install node-gyp separately, the app I tried to install w/o success seemed to install this module.
When I look at the user/appdata/roaming folder, node-gyp is created in a separate .node-gyp folder and not within the subfolder of npm/modules folders inside roaming. Is that (strange location of .node-gyp folder) normal?
Should I install node-gyp module (globally) to eradicate these errors?
Please advise.
Thanks in advance,
Sorcerer
saper commentedon Aug 3, 2017
Step 6 means everything is done and there should be no errors. If you are getting something else I'd file another bug. Kerberos errors suggest you might need proxy authentication to download stuff, I think this is out of scope of node-gyp
WillingAC commentedon Oct 20, 2017
Thank you all for paticipating the discussion and share your insights.
I also met the problem while installing a native node module, and eventually, just solved it by installing Visual C++ Build Tool from npm-gyp official documents Microsoft's Node.js Guidelines for Windows, by which installed
(althought I'm using Windows 10, an error message indicated the missing of 8.1 SDK )
I also installed the other two, but I'm not sure if they were neccessary, which are
With other issues like Python version and PATH settings addressed, npm started to work normally.
toyssamurai commentedon May 13, 2018
Just like WillingAC, I also followed the official document from Microsoft's Node.js Guidelines for Windows, but I am still having problems when I tried to compile the Couchbase SDK for node (couchnode). The errors I ran into are:
uv-plugin-all.obj : error LNK2001: unresolved external symbol __imp_WSAGetLastError [D:\Development\NodeJs\couchbase-te st\node_modules\couchbase\build\couchbase_impl.vcxproj] uv-plugin-all.obj : error LNK2001: unresolved external symbol __imp_getsockopt [D:\Development\NodeJs\couchbase-test\no de_modules\couchbase\build\couchbase_impl.vcxproj] uv-plugin-all.obj : error LNK2001: unresolved external symbol __imp_recv [D:\Development\NodeJs\couchbase-test\node_mod ules\couchbase\build\couchbase_impl.vcxproj] D:\Development\NodeJs\couchbase-test\node_modules\couchbase\build\Release\couchbase_impl.node : fatal error LNK1120: 3 unresolved externals [D:\Development\NodeJs\couchbase-test\node_modules\couchbase\build\couchbase_impl.vcxproj]After some Google searches, I found that I needed to link to WS2_32.Lib. I checked the SDK folder under C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86 (and x64) and the file is there. So, somehow npm-gyp just couldn't pass the location to msbuild. I also tried setting an environment variable ILink_LibraryPath and pointed it to WS2_32.Lib before compiling the module, but it didn't help. I am at lost!
bnoordhuis commentedon May 13, 2018
@toyssamurai You should report that to the maintainers of the couchbase module, it's not a node-gyp issue. Make sure you're using the latest version, it might have been fixed already.
tensa008 commentedon Jun 4, 2018
I tired to find the MS standalone compiler, but when I opened the link it says the account expired. Is there any other link to download MS C++ standalone compiler.
refack commentedon Apr 9, 2019
In VS2017 & VS2019 MS did not release a stand alone compiler. There is a CLI only "Built Tools" SKU at - https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
pancake77j commentedon Jan 24, 2020
I did all the tasks described above to recompile node-java, in order to install node-jdbc. But I sill fail, even though I did all the described measures above: installed python, have .Net 4.5.1, installed Visual Studio 2015, installed Build Tools, set "npm config -g set msvs_version 2015" and also tried many other measures described in other threads.
But, when I try to recompile node-java, I get the following error message:
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exefailed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\EigeneProgramme\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\EigeneProgramme\nodejs\node.exe" "C:\EigeneProgramme\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Workspaces\Lehre\WE2\node-jdbc-example-master\node_modules\jdbc\node_modules\java
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.8.0 install:
node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.8.0 install 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:
Has anybody an idea, what else I can do? Thanks for your help in advance!
John
bharathrajitagi commentedon Oct 5, 2021
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exefailed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Users\bhara\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.19042
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 D:\boilerplate\node_modules\zerorpc\node_modules\zeromq
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
error Command failed with exit code 1.
error Command failed with exit code 1.
Anyone have any idea how to resolve this ?
cclauss commentedon Oct 5, 2021
@bharathrajitagi The text at https://github.com/nodejs/node-gyp/issues/new has the answers.
You are using node-gyp v3 when the current release is v8. https://github.com/nodejs/node-gyp/releases