Closed ad34 closed 3 years ago
looks like the issue is caused by npm (or node gyp ? ) not properly handling the proxy because of the "/" at the end of the npm http-proxy config setting. solved for me.
actually the problem is still present after a few successful install. I have no idea why this issue is so unpredicable , but I m sure there is a problem somewhere, on this module, node gyp/ pre gyp or npm itself . it s probably related to a module not handling properly the proxy.
I think npm should give you a log file with the verbose log output, at least when it fails. That might have some information from node-pre-gyp about the proxy setting.
I'm not sure it's the same problem, but I also ran into build failure when npm failed to download the binary package because it did not have the corporate firewall CA. Log here: https://gist.github.com/orgads/b5d17bfbb299e660e6b6f02197a939ab
I was able to download the binary package by setting NODE_EXTRA_CA_CERTS
, but do you know why building from source fails?
@orgads looks like the same issue, we get the same compilation errors. I m curious of how you sloved your issue with NODE_EXTRA_CA_CERTS. and curious as well of the compilation issue, openssl should compile fine on windows.
Compiling a node extension targetting Windows that uses OpenSSL is very difficult. See https://github.com/nodejs/node-gyp/wiki/Linking-to-OpenSSL
thank @nicolasnoble . so precompiled binaries seems to be the only viable solution. the issue may be related to this : https://github.com/mapbox/node-pre-gyp/issues/400
Maybe. I am actually a maintainer of node-pre-gyp. I can make this revert happen.
npm i -g node-gyp
work for me
This what I did to solve the problem (off-course temprory): npm install -> It will install grpc along with other module. But build will fail. go to package.json file in grpc module and change the binary section with a build which exists in repository like: "binary": { "module_name": "grpc_node", "module_path": "grpc-precompiled-binaries/node/grpc-tools/v0.15.0", "host": "https://node-precompiled-binaries.grpc.io/", "remote_path": "grpc-precompiled-binaries/node/grpc-tools/v0.15.0", "package_name": "windows-x64.tar.gz" }, run npm rebuild. Hope his will help someone. Thanks
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v72-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.10.1 and node@12.14.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for grpc@1.10.1 and node@12.14.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
gyp ERR! find VS - could not find MSBuild in registry for this version
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:20
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:302:5)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
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" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\Users\sdf apk toolkit\ionic\whos-present-master\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\Users\sdf apk toolkit\ionic\whos-present-master\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown" "--python=C:/Program Files/Git/path/to/executable/python"
gyp ERR! cwd C:\Users\sdf apk toolkit\ionic\whos-present-master\node_modules\grpc
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
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 C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\sdf apk toolkit\ionic\whos-present-master\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\sdf apk toolkit\ionic\whos-present-master\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown --python=C:/Program Files/Git/path/to/executable/python' (1)
node-pre-gyp ERR! stack at ChildProcess.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.10.1 install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.10.1 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: npm ERR! C:\Users\SADAF_YOUNAS.MHF\AppData\Roaming\npm-cache_logs\2020-02-18T07_29_05_791Z-debug.log having this error tried everything , please help me to resolve th eissue
grpc 1.10 is old enough that it probably doesn't work with Node 12. The latest version of grpc is 1.24.2. I suggest using that instead.
@murgatroid99 also error with 1.24.2
The details of the error matter. There have been at least 3 errors shared in this issue and they're all substantially different and were caused by different problems. What error, specifically, did you get?
The grpc
package is now deprecated, so we will not be making further fixes to address these problems.
Problem description
Error installing on Windows 10 with npm or yarn I know this issue has been mentionned many time here and marked as closed, but it s not fixed on our windows 10 build machine so opening a new issue .
Reproduction steps
start a new node.js project npm init npm install grpc --save
node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(500): https://node-precompiled-binaries.grpc.io/grpc/v1.18.0/node-v64-win32-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not found for grpc@1.18.0 and node@10.15.1 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
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\myuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:189:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\myuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\nod e-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\Users\myuser\Desktop\firebasetest\node_modules\grpc\src\node\ \extension_binary\node-v64-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\Users\myuser\Desktop\firebasetest\nod e_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_n api_label=node-v64" gyp ERR! cwd C:\Users\myuser\Desktop\firebasetest\node_modules\grpc gyp ERR! node -v v10.15.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not okEnvironment
Additional context
I am behind a corporate proxy , but everything is configured to run smoothly with npm as it s centric in our pipeline
npm config get
; cli configs metrics-registry = "https://registry.npmjs.org/" scope = "" user-agent = "npm/6.7.0 node/v10.15.1 win32 x64"
; userconfig C:\Users\myuser.npmrc color = true http-*proxy = "http://proxy.mycompany.org:3128/" http-proxy = "http://proxy.mycompany.org:3128/" https-proxy = "http://proxy.mycompany.org:3128/" msvs_version = "2015" proxy = "http://proxy.mycompany.org:3128/" registry = "https://registry.npmjs.org/" strict-ssl = false
; builtin config undefined prefix = "C:\Users\myuser\AppData\Roaming\npm"
; node bin location = C:\Program Files\nodejs\node.exe ; cwd = C:\Users\myuser\Desktop\firebasetest ; HOME = C:\Users\myuser ; "npm config ls -l" to show all defaults.
I tried to install node-pre-gyp as global , npm cache clean --force , but the issue is still present. pre compiled binaries cannot be found, and compilation failed