firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Issue installing firebase tool

Open aurobindodebnath opened this issue 9 years ago • 24 comments

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

aurobindodebnath avatar Jun 16 '17 12:06 aurobindodebnath

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 [email protected] 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 .

mbleigh avatar Jun 16 '17 15:06 mbleigh

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?

RichieRock avatar Aug 15 '17 10:08 RichieRock

Same issue:

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

auzystephens avatar Aug 15 '17 23:08 auzystephens

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

laurenzlong avatar Aug 16 '17 00:08 laurenzlong

@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

auzystephens avatar Aug 16 '17 15:08 auzystephens

@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

RichieRock avatar Aug 17 '17 11:08 RichieRock

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

auzystephens avatar Aug 17 '17 18:08 auzystephens

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

RichieRock avatar Aug 24 '17 19:08 RichieRock

Same issue here (node 8.6.0).

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

duncan1a avatar Oct 12 '17 07:10 duncan1a

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

mbleigh avatar Jan 29 '18 21:01 mbleigh

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

myusufid avatar Dec 07 '18 03:12 myusufid

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

aelbarbary avatar Dec 28 '18 18:12 aelbarbary

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 avatar Jan 17 '19 17:01 bhandaribhumin

@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 avatar Jan 17 '19 17:01 mbleigh

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

bhandaribhumin avatar Jan 17 '19 17:01 bhandaribhumin

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.

SimonForwood avatar Jan 27 '19 05:01 SimonForwood

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

mkelle avatar Feb 06 '19 08:02 mkelle

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

Riteshsulakhe1 avatar Feb 15 '19 07:02 Riteshsulakhe1

--> 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!

dakshapatel avatar Feb 24 '19 23:02 dakshapatel

It works for me after update latest node

On Mon, 25 Feb 2019 at 5:27 AM, Daksha Patel [email protected] 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.....

bhandaribhumin avatar Feb 25 '19 00:02 bhandaribhumin