Firebase-js-sdk: Does not install on Node 10

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


[REQUIRED] Describe your environment

  • Operating System version: node:10 Docker image
  • Firebase SDK version: 5.x
  • Firebase Product: all

[REQUIRED] Describe the problem

When attempting to run npm install with the latest firebase package (5.x) under Node.js 10, installation cannot complete due to missing grpc binaries: 锘匡豢https://www.dropbox.com/s/kqafpzpx7ytt5eh/Screenshot%202018-05-30%2023.33.04.png?dl=0

Steps to reproduce:

run npm install firebase

Relevant Code:

none

needs-triage

Most helpful comment

On node 10.5, upgrading firebase/firebase-tools did the trick for me:

    "firebase": "5.2.0",
    "firebase-tools": "3.19.3"

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.

There is likely something specific to your setup causing this. Can you post more information about your environment? Using the standard node 10 docker image:

vwoo@ubuntu:~/shared/execute/docker$ docker run --rm --entrypoint bash -it node:10
Unable to find image 'node:10' locally
10: Pulling from library/node
3d77ce4481b1: Pull complete
534514c83d69: Pull complete
d562b1c3ac3f: Pull complete
4b85e68dc01d: Pull complete
f6a66c5de9db: Pull complete
7a4e7d9a081d: Pull complete
0c0b3ede158b: Pull complete
4fbc38d3bc30: Pull complete
Digest: sha256:849e9251164a7f56d6ae6657cf80a558198b07b10dc30b290500d333fc751910
Status: Downloaded newer image for node:10

root@721b58b1beea:/# npm install firebase

> [email protected] install /node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" is installed via remote
npm WARN saveError ENOENT: no such file or directory, open '/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

+ [email protected]
added 137 packages from 74 contributors and audited 197 packages in 12.458s
found 0 vulnerabilities

root@721b58b1beea:/# node --version
v10.3.0

Examining your error image, it seems that the GRPC binaries failed to download. Is this a transient build error? Perhaps the Google team can comment.

I'm getting the same error inside travisCI environment.

$ node --version
v10.3.0
$ npm --version
6.1.0
$ nvm --version
0.33.11

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-linux-x64-glibc.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
...

Full travis log.txt.

I just tried to npm install firebase on a machine with the following engines:

  • npm: 6.1.0
  • Node.js: 10.5.0
  • firebase: 5.2.0

Everything seemed to go fine. It looks like you are trying to install a version of Firebase which has a grpc dependency version with some known issues (i.e. [email protected]). I'd recommend updating Firebase and trying again.

I know this is closed, however find below some probably useless information.

In case you cloned from a repo created in a node environment not similar to yours the build might fail; which will further screw up your local npm cache. Try the following (in your project folder - not for the global node installation) :-

rm <path-to>/package-lock.json
rm -rf <path-to>/node_modules
npm cahce clean --force
npm install

On node 10.5, upgrading firebase/firebase-tools did the trick for me:

    "firebase": "5.2.0",
    "firebase-tools": "3.19.3"

@aervin Could you explain how to update it on node 10.5? I am facing a similar issue.

Was this page helpful?
0 / 5 - 0 ratings