Firebase-js-sdk: Installation failures due to native compilation

Created on 4 Nov 2018  路  6Comments  路  Source: firebase/firebase-js-sdk

I'm trying to install firebase with:

npm i -S firebase

this seems to kick off a very long compilation process which eventually fails and I get some C++ code error displayed to me. I don't expect to be able to fix this issue so I won't provide details but I felt I should file an issue so that you can think about changing your installation process.

All I want is to do is import firebase for a test in a create-react-app application. Why is this requiring me to kick off a native compilation? This is code that will run in the browser. I'm not planning on running anything on the server, this install should take a matter of seconds to download some JS packages and should be robust to the users development environment.

needs-triage

Most helpful comment

@briandipalma Just got here because i have the same issue.

However... I know what the issue is in my environment.

I'm attempting to upgrade from

  • nodejs 10 to 11.
  • angular 6 to 7
  • typescript 2.x to 3.x

@firebase/firestore uses grpc which does not support nodejs 11 yet

https://github.com/grpc/grpc-node/issues/609

All 6 comments

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@briandipalma Just got here because i have the same issue.

However... I know what the issue is in my environment.

I'm attempting to upgrade from

  • nodejs 10 to 11.
  • angular 6 to 7
  • typescript 2.x to 3.x

@firebase/firestore uses grpc which does not support nodejs 11 yet

https://github.com/grpc/grpc-node/issues/609

Upgrading grpc from 1.16.0 to 1.16.1 should do the trick, as for 1.16.1 there are precompiled binaries available.

Thanks for help but this issue was more about the fact I needed to native compile code when all I wanted was a browser hosted JS package. I think the installation process is more brittle than it needs to be. I imagine they are mixing some server code with the front end code and it's the server code that's causing the issue. A more robust approach would be a standalone, simple front end package.

Should be solved in #1394, hope they make a minor release soon so firebase works with node 11.

The upgrade to grpc 1.16.1 was released a while ago, so hopefully this problem is resolved.

Was this page helpful?
0 / 5 - 0 ratings