grpc-node: Fails to install grpc@1.17.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
The problem occurs when doing npm install of a project.
Environment
Angular CLI: 1.7.4 Node: 9.2.0 OS: win32 x64 Windows 10 Angular: 5.0.3 … animations, common, compiler, core, forms, http … platform-browser, platform-browser-dynamic, router
@angular/cli: 1.7.4 @angular/compiler-cli: 5.2.11 @angular/language-service: 5.2.11 @angular-devkit/build-optimizer: 0.3.2 @angular-devkit/core: 0.3.2 @angular-devkit/schematics: 0.3.2 @ngtools/json-schema: 1.2.0 @ngtools/webpack: 1.10.2 @schematics/angular: 0.3.2 @schematics/package-update: 0.3.2 typescript: 2.5.3 webpack: 3.11.0 npm:6.5.0
Additional context
I attach the result and log
error completo.txt 2019-01-04T20_35_36_697Z-debug.log
E:\TFStudio\Repos\idepWeb\node_modules\grpc\build\Release\\libz.lib
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\Emilse\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Emilse\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=E:\\TFStudio\\Repos\\idepWeb\\node_modules\\grpc\\src\\node\\extension_binary\\node-v59-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\\TFStudio\\Repos\\idepWeb\\node_modules\\grpc\\src\\node\\extension_binary\\node-v59-win32-x64-unknown" "--node_abi_napi=node-v59" "--napi_build_version=0" "--node_napi_label=node-v59"
gyp ERR! cwd E:\TFStudio\Repos\idepWeb\node_modules\grpc
gyp ERR! node -v v9.2.0
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 (x86)\nodejs\node.exe C:\Users\Emilse\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown --node_abi_napi=node-v59 --napi_build_version=0 --node_napi_label=node-v59' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (E:\TFStudio\Repos\idepWeb\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:159:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "E:\\TFStudio\\Repos\\idepWeb\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd E:\TFStudio\Repos\idepWeb\node_modules\grpc
node-pre-gyp ERR! node -v v9.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Users\Emilse\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\TFStudio\Repos\idepWeb\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown --node_abi_napi=node-v59 --napi_build_version=0 --node_napi_label=node-v59' (1)
npm WARN angular-calendar@0.17.4 requires a peer of @angular/animations@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-calendar@0.17.4 requires a peer of @angular/common@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-calendar@0.17.4 requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-calendar@0.17.4 requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-highcharts@4.1.2 requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/compiler-cli@5.2.11 requires a peer of @angular/compiler@5.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.17.0 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.17.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:
npm ERR! C:\Users\Emilse\AppData\Roaming\npm-cache\_logs\2019-01-04T20_24_52_759Z-debug.log
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 28 (3 by maintainers)
@FutureHits3Dev I deleted “firebase”: “^5.8.3”, “firebase-admin”: “^8.6.1”, “firebase-functions”: “^3.3.0”, “firebaseauth”: “^1.0.0”
But I think the error is caused by firebase-functions
npm install --save node-pre-gyp
in the problematic project works - you essentially have to treat it like a peer dependency because of the compilation difficulties on Windows.This is what people are referring to by “use the pre-compiled binaries” as well 😃
is there a solution for this?
This answer helped me. So I just downgraded node (with nvm) and it worked!
Windows 10 x64 here with node 14:
npm install --save node-pre-gyp
did the trick 😃downgrading node to v11 worked
Work fine with node 10.16.3
I changed node to 10.16.3, also worked. It failed at 12.12.0 before.
The
grpc
package is now deprecated, so we will not be making any fixes to address this. We recommend instead using@grpc/grpc-js
, which won’t have this kind of problem.I am getting the same error when running
npm install
for a project file. There was a huge console log but these are the major parts of the outputOS: Pop!_OS 20.04 LTS
node --version
: v12.18.1 'npm -v` : 6.14.5 log_file: 2020-07-31T02_04_31_133Z-debug.logI deleted everything in my ./node_modules folder, removed firebase from my package.json file, and I ran
npm i
again. That fixed my issue with this.Deleting unused firebase modules worked for me.