grpc-node icon indicating copy to clipboard operation
grpc-node copied to clipboard

npm install firebase fails due to grpc

Open dkearsley89 opened this issue 8 years ago • 15 comments

I'm trying to install firebase to my Angular Project. I have tried with several versions of Node.js but no luck so far.

I get an error similar to that of below:

[email protected] install E:\Development\Angular\RecipeBookProject\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.2/node-v48-win32-x64-unknown.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at Object.failNoPython (E:\Development\Angular\RecipeBookProject\node_modules\node-gyp\lib\configure.js:483:19) gyp ERR! stack at Object. (E:\Development\Angular\RecipeBookProject\node_modules\node-gyp\lib\configure.js:508:16) gyp ERR! stack at E:\Development\Angular\RecipeBookProject\node_modules\graceful-fs\polyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\Development\Angular\RecipeBookProject\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=E:\Development\Angular\RecipeBookProject\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\Development\Angular\RecipeBookProject\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown" gyp ERR! cwd E:\Development\Angular\RecipeBookProject\node_modules\grpc gyp ERR! node -v v6.12.1 gyp ERR! node-gyp -v v3.6.2 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 E:\Development\Angular\RecipeBookProject\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\Development\Angular\RecipeBookProject\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\Development\Angular\RecipeBookProject\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown' (1) node-pre-gyp ERR! stack at ChildProcess. (E:\Development\Angular\RecipeBookProject\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:106:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:920:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) node-pre-gyp ERR! System Windows_NT 6.1.7601 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\Development\Angular\RecipeBookProject\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:\Development\Angular\RecipeBookProject\node_modules\grpc node-pre-gyp ERR! node -v v6.12.1 node-pre-gyp ERR! node-pre-gyp -v v0.6.39 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe E:\Development\Angular\RecipeBookProject\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\Development\Angular\RecipeBookProject\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\Development\Angular\RecipeBookProject\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown' (1) [email protected] E:\Development\Angular\RecipeBookProject `-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 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" "install" "firebase" npm ERR! node v6.12.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build --library=static_library'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the grpc package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build --library=static_library npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs grpc npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls grpc npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! E:\Development\Angular\RecipeBookProject\npm-debug.log npm ERR! code 1

I can post the contents of npm-debug.log if required.

I'm not sure if this is the correct place to post something like this, but google has come up short and the feedback from npm suggests to do this.

Thanks

dkearsley89 avatar Dec 08 '17 04:12 dkearsley89

I faced a similar problem. For me, the problem seemed to be my antivirus (Kaspersky). Once I disabled it, I was able to install firebase.

ygongdev avatar Jan 16 '18 20:01 ygongdev

@ygongdev Thanks a lot, you saved my day.

nsksaisaravana avatar Jan 28 '18 03:01 nsksaisaravana

This fixed my issue:

https://stackoverflow.com/questions/48531993/firebase-config-variables-are-not-available-error-with-deploying-functions

Levelleor avatar Feb 01 '18 00:02 Levelleor

disable antivirus then start same comman. it is working for me.

ksdroid943 avatar Feb 01 '18 13:02 ksdroid943

disabling anti virus ( kaspersky ) and running the firebase, angularfire2 install worked for me .. just in case if any one is tuck on this issue ..

sree332 avatar Feb 03 '18 15:02 sree332

Seems to be an issue with Kaspersky. I paused protection and it installed successfully. You should resume protection right after :).

samybaxy avatar Feb 22 '18 15:02 samybaxy

The latest firebase-tools (v3.17.5) removes grpc as a dependency, which should resolve these issues. Please upgrade by running npm i -g firebase-tools

laurenzlong avatar Mar 07 '18 19:03 laurenzlong

Issue Resolved! In my case, I faced the same issue... I installed npm install -g [email protected]

and removed cap ^ in package.json before firebase version. #hopeItWillWorkForYou

JavaidAhmad avatar Mar 22 '18 05:03 JavaidAhmad

i got the same error - i have not kaspersky i using (Windows Defender Security Center) and i disable that and run npm install firebase angularfire2 --save and not works again ,, how can i fix that ?

Benyaminrmb avatar Apr 22 '18 11:04 Benyaminrmb

Same issue, Windows 10 (17134.1), NodeJs (10.0.0), NPM (5.6.0), Yarn (1.6.0) [Stand Alone] Tried all the above suggestions for both npm & yarn, tried going to NodeJS 8LTS and disabling the antivirus (Kaspersky) without any success

The only solution worked for me is to install [email protected] or [email protected] , no need for anything else. For me the issue is with 4.13.X

alchatti avatar May 07 '18 10:05 alchatti

@Benyaminrmb did you found any solution for your problem. If you found solution then please help me i am also getting same issue.

rmnchopra91 avatar May 17 '18 04:05 rmnchopra91

Alright, I am going to close this one. The original problem has a known solution, and the rest of this thread is a big confusion of various different issues.

If you experience issues with grpc, please open new issues describing exactly what the problem you are experiencing is. Most of the time your issue is NOT going to be the same as someone else's.

nicolasnoble avatar May 17 '18 05:05 nicolasnoble

Windows Defender also blocks it

Couvel avatar Nov 05 '18 03:11 Couvel

Hello, I am getting the following error on my vscode debugger Error: Failed to load gRPC binary module because it was not installed for the current system Expected directory: node-v64-linux-x64-glibc Found: [node-v57-linux-x64-glibc] This problem can often be fixed by running "npm rebuild" on the current system Original error: Cannot find module '/home/hypledvm/go/src/utilitypoc/network/acmedevmode/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node'

sahirvsahirv avatar Nov 27 '18 15:11 sahirvsahirv

@sahirvsahirv this has nothing to do with the original report. As I said a couple of comments above, please avoid bumping old, resolved issues, and create new issues fully describing what you're experiencing so we can properly triage what's going on.

nicolasnoble avatar Nov 27 '18 17:11 nicolasnoble