Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing firebase tool #372

Closed
aurobindodebnath opened this issue Jun 16, 2017 · 24 comments
Closed

Issue installing firebase tool #372

aurobindodebnath opened this issue Jun 16, 2017 · 24 comments

Comments

@aurobindodebnath
Copy link

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 node-uuid@1.4.8: Use uuid module instead
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/bin/firebase

> grpc@1.3.8 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 grpc@1.3.8 and node@8.0.0 (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

@mbleigh
Copy link
Contributor

mbleigh commented Jun 16, 2017 via email

@RichieRock
Copy link

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 iltorb@1.3.4 and node@8.2.1 (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
npm/npm#18113

Any help?

@auzystephens
Copy link

Same issue:

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

@laurenzlong
Copy link
Contributor

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

@auzystephens
Copy link

auzystephens commented Aug 16, 2017

@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

@RichieRock
Copy link

@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

@auzystephens
Copy link

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

@RichieRock
Copy link

RichieRock commented Aug 24, 2017 via email

@duncan1a
Copy link

Same issue here (node 8.6.0).

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

@mbleigh
Copy link
Contributor

mbleigh commented Jan 29, 2018

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

@mbleigh mbleigh closed this as completed Jan 29, 2018
@myusufid
Copy link

myusufid commented Dec 7, 2018

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

@aelbarbary
Copy link

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

@bhandaribhumin
Copy link

bhandaribhumin commented Jan 17, 2019

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.

@mbleigh
Copy link
Contributor

mbleigh commented Jan 17, 2019

@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.

@bhandaribhumin
Copy link

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

@SimonForwood
Copy link

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.

@mkelle
Copy link

mkelle commented Feb 6, 2019

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

@Riteshsulakhe1
Copy link

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

@dakshapatel
Copy link

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

@bhandaribhumin
Copy link

bhandaribhumin commented Feb 25, 2019 via email

@Munene84
Copy link

Munene84 commented Aug 3, 2020

It works for me after update latest node

@geiz
Copy link

geiz commented Sep 2, 2020

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

@jpcarnes
Copy link

@geiz same thing happened to me and after investigating this was the fix. For anyone that has this issue and is running recent versions of node / version of firebase tools I would check out the above answer by geiz.

In my case I was trying to npm update but kept running into this issue, space at the end of folder name was causing it to not find the folder.

@sa-od
Copy link

sa-od commented Jun 30, 2022

I SOLVED this problem by on linux : "curl -sL https://firebase.tools | bash"
visit this site : https://firebase.google.com/docs/cli/?authuser=0&hl=en#mac-linux-auto-script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests