Firebase-tools: Issue installing firebase tool

Created on 16 Jun 2017  Â·  22Comments  Â·  Source: firebase/firebase-tools

I get an error while installing firebase tool and I can't figure out the problem.

auro@Sherlock:~/Downloads/web-starter-kit-0.6.5$ sudo npm install -g firebase-tools
npm WARN deprecated [email protected]: Use uuid module instead
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/bin/firebase

> [email protected] install /usr/local/lib/node_modules/firebase-tools/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.3.8/node-v57-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp) 
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/build'
gyp ERR! System Linux 4.8.0-49-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary"
gyp ERR! cwd /usr/local/lib/node_modules/firebase-tools/node_modules/grpc
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.8.0-49-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/firebase-tools/node_modules/grpc
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary' (1)
npm ERR! Cannot read property 'type' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/auro/.npm/_logs/2017-06-16T11_54_55_701Z-debug.log

node v8.0.0
npm 5.0.0
ubuntu os 16.04

Most helpful comment

This isn't really a solution, but running sudo npm i -g firebase-tools with the --unsafe-perm flag does allow it to install.

All 22 comments

Node 8.0.0 has errors that prevent Firebase from being installed. Please
upgrade to 8.1.1.

On Fri, Jun 16, 2017, 5:05 AM Aurobindo Debnath notifications@github.com
wrote:

I get an error while installing firebase tool and I can't figure out the
problem.

auro@Sherlock:~/Downloads/web-starter-kit-0.6.5$ sudo npm install -g firebase-tools
npm WARN deprecated [email protected]: Use uuid module instead
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/bin/firebase

[email protected] install /usr/local/lib/node_modules/firebase-tools/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.3.8/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/build'
gyp ERR! System Linux 4.8.0-49-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary"
gyp ERR! cwd /usr/local/lib/node_modules/firebase-tools/node_modules/grpc
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.8.0-49-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/firebase-tools/node_modules/grpc
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary' (1)
npm ERR! Cannot read property 'type' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR! /home/auro/.npm/_logs/2017-06-16T11_54_55_701Z-debug.log

node v8.0.0
npm 5.0.0
ubuntu os 16.04

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/372, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAAD_gPK8mc1qt6xZRaA6buAhCQdBuEcks5sEm96gaJpZM4N8YK2
.

Hi!

I updated node to 8.2.1 and I'm using npm 5.3.0 but I still have similar problem. I'm trying to run the same command sudo npm install -g firebase-tools and getting same errors like

node-pre-gyp ERR! Tried to download(undefined): https://node-iltorb.s3.amazonaws.com/iltorb/v1.3.4/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI) (falling back to source compile with node-gyp) 
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase-tools/node_modules/iltorb/build'
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/firebase-tools/node_modules/iltorb/build/bindings/encode.node --module_name=encode --module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/iltorb/build/bindings' (1)

Similar issues have been posted in other places too, but none of the tricks seem to work: https://stackoverflow.com/questions/45595684/unable-to-install-firebase-tools-using-npm
https://stackoverflow.com/questions/45596926/trying-to-install-firebase-tools-and-getting-a-strange-error
https://github.com/npm/npm/issues/18113

Any help?

Same issue:

OS: Bash on Windows (WSL)
Node: 8.4.0
npm: 5.3.0

Hey @RichieRock @Austin-Stephens Are you two sure that the install actually failed? When you run "firebase --version" does anything show up?

@laurenzlong Yes, prior to running sudo npm i -g firebase-tools all was well. I did not update anything except this package. I also am able to install other global npm packages without issue. Now it fails:

command not found: firebase

@laurenzlong Yes same here, the install has failed.

> firebase --version
firebase: command not found

Npm version 5 introduced npx command. I cannot even run firebase with this command even though it shows that it installed it:

> npx firebase --version
npx: installed 22 in 4.027s
command not found: firebase

This isn't really a solution, but running sudo npm i -g firebase-tools with the --unsafe-perm flag does allow it to install.

I installed nvm and with that this started to work. Don't know what was
different with my system node/npm installation.

Same issue here (node 8.6.0).

sudo npm i -g firebase-tools --unsafe-perm does work though

Please follow up with grpc installation errors at grpc/grpc-node#121

i have same issue

with node version v8.10.0
running this command
sudo npm i -g firebase-tools --unsafe-perm not work for me

I have npm version 6.4.1 and node version 10.14.1 and I still see this issue

Refusing to delete /usr/local/bin/firebase: ../lib/node_modules/firebase-tools/bin/firebase symlink target is not controlled by npm /usr/local/bin

ERROR

npm ERR! path /usr/local/lib/node_modules/firebase-tools/node_modules/mkdirp/bin/cmd.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/firebase-tools/node_modules/mkdirp/bin/cmd.js'
npm ERR! enoent This is related to npm not being able to find a file.

@bhandaribhumin this seems to be an NPM issue in installing the module. I'd try running npm cache clean and/or npm uninstall -g firebase-tools then try installing again.

@mbleigh thanks for reply man tried but not worked. :(

ERROR

npm ERR! path /usr/local/lib/node_modules/firebase-tools/node_modules/mkdirp/bin/cmd.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/firebase-tools/node_modules/mkdirp/bin/cmd.js'
npm ERR! enoent This is related to npm not being able to find a file.

This error seemed to go away for me (on macbookpro) after upgrade to latest node and npm.

this is still a problem, i tried
-> npm cache clean
-> npm uninstall -g firebase-tools
then -> npm install -g firebase-tools
even -> sudo npm i -g firebase-tools --unsafe-perm

I still get
npm ERR! path /usr/local/lib/node_modules/firebase-tools/node_modules/mkdirp/bin/cmd.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/firebase-tools/node_modules/mkdirp/bin/cmd.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

nothing works

solved my issue by upgrading node v8.0.0 to v8.1.1

--> npm clean --force
--> nvm install node --reinstall-packages-from=node (this updates to node v11.10.0 (npm v6.7.0))
-->npm uninstall -g firebase-tools
-->npm install -g firebase-tools

This worked for me!

It works for me after update latest node

On Mon, 25 Feb 2019 at 5:27 AM, Daksha Patel notifications@github.com
wrote:

--> npm clean --force
--> nvm install node --reinstall-packages-from=node (this updates to node
v11.10.0 (npm v6.7.0))
-->npm uninstall -g firebase-tools
-->npm install -g firebase-tools

This worked for me!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/372#issuecomment-466831790,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLnb9M_xrWWKX8Wl-5f5kYT91iG7D5bks5vQybmgaJpZM4N8YK2
.

>

Bhumin.....

It works for me after update latest node

I couldn't get firebase tools to install with --force or --unsafe-perm.

So I went into /usr/local/bin and the firebase folder was named firebase instead of the intended firebase. Notice how there was a space at the end of the folder name.

Anyways, I removed it manually with rm -r firebase, and then sudo npm install -g firebase-tools worked.

david@Davids-MBP bin % ls
2to3            firebase        lzcat           lzmore          pip3            pydoc3          watchman-make       xzfgrep
2to3-3.8        fuzzy_match     lzcmp           mke2fs          pip3.8          pydoc3.8        watchman-wait       xzgrep
adb         gdbm_dump       lzdiff          netlify         pod         python3         wheel3          xzless
brew            gdbm_load       lzegrep         node            prl_convert     python3-config      xcodeproj       xzmore
dmtracedump     gdbmtool        lzfgrep         npm         prl_disk_tool       python3.8       xz          yarn
easy_install-3.8    heroku          lzgrep          npx         prl_perf_ctl        python3.8-config    xzcat           yarnpkg
etc1tool        hprof-conv      lzless          ntl         prlcore2dmp     sandbox-pod     xzcmp
expo            httpclient      lzma            pcre-config     prlctl          unlzma          xzdec
expo-cli        idle3           lzmadec         pcregrep        prlexec         unxz            xzdiff
fastboot        idle3.8         lzmainfo        pcretest        prlsrvctl       watchman        xzegrep
david@Davids-MBP bin % cd firebase 
cd: not a directory: firebase
david@Davids-MBP bin % rm -r firebase 
override rwxr-xr-x  root/wheel for firebase? y
Was this page helpful?
0 / 5 - 0 ratings