mapbox / node-pre-gyp

Node.js tool for easy binary deployment of C++ addons
BSD 3-Clause "New" or "Revised" License
1.11k stars 263 forks source link

windows 11 faild #632

Open parsibox opened 2 years ago

parsibox commented 2 years ago

windows 11 64 bit node -v v16.13.2 node-pre-gyp -v v0.13.0

error D:\vue\test\vue.pwa.weather.app\node_modules\grpc: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --library=static_library
Arguments:
Directory: D:\vue\test\vue.pwa.weather.app\node_modules\grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.13.0
node-pre-gyp info using node@16.13.2 | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "D:\vue\test\vue.pwa.weather.app\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown\grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.22.2/node-v93-win32-x64-unknown.tar.gz
node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.22.2/node-v93-win32-x64-unknown.tar.gz
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.22.2/node-v93-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.22.2 and node@16.13.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.22.2/node-v93-win32-x64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@16.13.2 | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@16.13.2 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\ProgramData\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:397:12)
gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
gyp ERR! System Windows_NT 10.0.22538
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\vue\\test\\vue.pwa.weather.app\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=D:\\vue\\test\\vue.pwa.weather.app\\node_modules\\grpc\\src\\node\\extension_binary\\node-v93-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=D:\\vue\\test\\vue.pwa.weather.app\\node_modules\\grpc\\src\\node\\extension_binary\\node-v93-win32-x64-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd D:\vue\test\vue.pwa.weather.app\node_modules\grpc
gyp ERR! node -v v16.13.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe D:\vue\test\vue.pwa.weather.app\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=D:\vue\test\vue.pwa.weather.app\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=D:\vue\test\vue.pwa.weather.app\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\vue\test\vue.pwa.weather.app\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Windows_NT 10.0.22538
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\vue\\test\\vue.pwa.weather.app\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd D:\vue\test\vue.pwa.weather.app\node_modules\grpc
node-pre-gyp ERR! node -v v16.13.2
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
giuliohome commented 2 years ago

Similar issue here on windows 10. Have you found the solution? Why the node-v93-win32-x64-unknown?

parsibox commented 2 years ago

no

giuliohome commented 2 years ago

Sir, in the meantime I've found the solution for my specific case (probably it has nothing to do with yours though, sorry). In my case I have 1) a rough final solution 2) a quick analysis of the issue. Fyi 1) in my react app, it was due to firebase analytics the need of grpc causing my issue, hence as a very rough solution I deleted the firebase wrapper (just a couple of lines in the app js) of the react app (atm not needed in my dev) and I "solved" my issue 2) I think the original problem (after a misleading certificate error resolved with a node env var setting to ignore it) was a 404 not found due to an "unknown" final part in the URL. My wild guess is that it is due to a missing/incomplete setup of c++ win node-gyp sdk... Which appears to be a little problematic, in my case it was not a priority and I adopted point 1)

I've shared my latest gist comment in my profile (fwiw) https://gist.github.com/giuliohome/f8612fc663225d49be79296302c03ff6?permalink_comment_id=4313263#gistcomment-4313263