Firebase-js-sdk: Unable to install Firebase on new project

Created on 28 May 2018  路  8Comments  路  Source: firebase/firebase-js-sdk

[REQUIRED] Describe your environment

  • Operating System version: Windows 10 Profesionnal Edition
  • Firebase SDK version: None, targeting 5.0.4
  • Firebase Product: Whole package

[REQUIRED] Describe the problem

I create a new Angular project with the CLI.
I try to install Angular material. Works great.
I try to install Angular Flex Layout. Works Great.

I try to install firebase and Angular firebase-tools. Doesn't work, 2 errors.

I try to install firebase alone. Doesn't work. Output from npm install firebase :

(I am behind a corporate proxy, Python is installed on my station and the PATH has the variable, along with an user env variable)

[email protected] install C:\Projects\kekistan\node_modules\grpc
node-pre-gyp install --fallback-to-build --library=static_library

````
node-pre-gyp WARN Tried to download(400): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.11.3/node-v57-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\MT4E45CN\AppData\Local\Programs\Python\Python36\", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.14393
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:\Projects\kekistan\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\Projects\kekistan\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd C:\Projects\kekistan\node_modules\grpc
gyp ERR! node -v v8.11.2
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 C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Projects\kekistan\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Projects\kekistan\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Projects\kekistan\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Projects\kekistan\node_modules\grpc\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Projects\kekistan\node_modules\grpc
node-pre-gyp ERR! node -v v8.11.2
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
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:\Projects\kekistan\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Projects\kekistan\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown --napi_version=3 --node_abi_napi=napi' (1)
npm WARN @angular/[email protected] requires a peer of @angular/cdk@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (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! code ELIFECYCLE
npm ERR! errno 1
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

````

Steps to reproduce:

Explained above.

Relevant Code:

No relevant code.

Nota Bene

I tried with the solutions found there, it doesn't work either. I can't disable my antivirus/firewall, but I shouldn't have too.

Note that a previous project had no issue with installing firebase, that was about 2 months ago.

closed-by-bot needs-info no-recent-activity

Most helpful comment

Any news on that issue ?

All 8 comments

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

Any news on that issue ?

I was just getting that issue yesterday, but now it works for me. I did not change anything either, so it must have been patched.

I have the same problems. Do you have any solutions?

open cmd as admin;

npm install firebase --force

i have solved this problem. Solition was found here

@ghost, hope you're doing well. I haven鈥檛 heard from you in a while. Just wanted to check if you're still having issues here.


Hey @ghost. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!


Since there haven't been any recent updates here, I am going to close this issue.

@ghost if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

Was this page helpful?
0 / 5 - 0 ratings