-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update websocket fork (node-gyp err output on Windows / Node 12) #3371
Comments
I see web3 installing successfully in CI on Node 12.13 / Ubuntu Xenial here. Could you see if your error persists when moving down to a slightly lower Node version? This might help to isolate the problem. There's also a guide to Window's specific node-gyp problems here that might be useful for debugging. Could you go through that list and see if any of the suggestions resolve this for you? For clarity - could you also list which version of Web3 you're installing? |
|
with node v11.15.0: C:\Temp\web3.test\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) npm ERR! A complete log of this run can be found in:
|
@user535353 Have you looked at the windows guide referenced above? Do you have |
So, seems, the websocket dependency needs to be updated. |
@user535353 Thanks for investigating and for those links. I'm not able to reproduce this failure for Web3 1.2.6 on either 12.14.1 or 12.16.0. Tried:
Will see if I can get a Windows job running in CI to discover if this problem is Windows specific. |
@cgewecke Is there any reason to depend on '@web3-js/websocket' instead of 'websocket'? npm install websocket - gives 1.0.31 and no errors npm install @web3-js/websocket - gives 1.0.30 and errors |
Agree this would be the ideal solution. Would also like to be able to reproduce the error. The origins of the Websocket fork are in: |
Great they probably did improve the detection of the global object as well. Can you verify that those changes are applied @cgewecke? Edit: |
Out of curiosity - does the installation succeed for you or not? Was able to reproduce the output you posted above in this Travis CI job (Windows / Node 12.16.0 ), but installation appears to ok there. (Maybe superficially). Npm install exits 0. Node-gyp isn't throwing a fatal error. |
@user535353 Have reproduced the error you're seeing in a Windows 10 / Node 12 container on Travis. It only appears in the Windows node-gyp output, Linux and OSX are clean. Additionally, Web3 installs without obvious problems in the test. NPM completes successfully, and the lib is able to open a Websocket connection to Infura / fetch a block. So this doesn't look critical - e.g Windows / Node 12 users are able to install. That said we will need to pull in patches from web3-js/websocket's parent fork as part of basic 1.x maintenance and this should be part of it. |
same errors (Windows 10/Node 12.13.0). any progress for this issue? |
This issue was fixed in Websocket 1.0.31, but web3's fork did not keep up with that change. |
Expected behavior
npm install command is executed without errors
Actual behavior
npm install shows errors
Steps to reproduce the behavior
Logs
C:\Temp\web3.test\node_modules@web3-js\websocket>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
bufferutil.cc
win_delay_load_hook.cc
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(34,1): error C2660: 'v8::FunctionTemplate::GetFunction': function does not take 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Users\dummyuser\AppData\Local\node-gyp\Cache\12.14.1\include\node\v8.h(5995,46): message : see declaration of 'v8::FunctionTemplate::GetFunction' (compiling source file ..\src\bufferutil.cc) [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(34,1): error C2661: 'Nan::Set': no overloaded function takes 2 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(50,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(57,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(68,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(70,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(89,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(90,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(92,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(93,1): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Users\dummyuser\AppData\Local\node-gyp\Cache\12.14.1\include\node\v8.h(2613,40): message : see declaration of 'v8::Value::Int32Value' (compiling source file ..\src\bufferutil.cc) [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\bufferutil.cc(94,1): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
C:\Users\dummyuser\AppData\Local\node-gyp\Cache\12.14.1\include\node\v8.h(2613,40): message : see declaration of 'v8::Value::Int32Value' (compiling source file ..\src\bufferutil.cc) [C:\Temp\web3.test\node_modules@web3-js\websocket\build\bufferutil.vcxproj]
validation.cc
win_delay_load_hook.cc
C:\Temp\web3.test\node_modules@web3-js\websocket\src\validation.cc(114,1): error C2660: 'v8::FunctionTemplate::GetFunction': function does not take 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\validation.vcxproj]
C:\Users\dummyuser\AppData\Local\node-gyp\Cache\12.14.1\include\node\v8.h(5995,46): message : see declaration of 'v8::FunctionTemplate::GetFunction' (compiling source file ..\src\validation.cc) [C:\Temp\web3.test\node_modules@web3-js\websocket\build\validation.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\validation.cc(114,1): error C2661: 'Nan::Set': no overloaded function takes 2 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\validation.vcxproj]
C:\Temp\web3.test\node_modules@web3-js\websocket\src\validation.cc(133,1): error C2661: 'v8::Value::ToObject': no overloaded function takes 0 arguments [C:\Temp\web3.test\node_modules@web3-js\websocket\build\validation.vcxproj]
Versions
[NPM, Node, Web3.js, OS, device...]
OS: Win 10, desktop
Node: v12.14.1
Npm: 6.13.4
The text was updated successfully, but these errors were encountered: