I am trying to deploy Firebase hosting of my web app.
At the command line, when I type firebase deploy
, I get the following error.
Note: f
Expanding more detail to the solution provided by @jacobawenger:
The most robust solution is to install Homebrew and let Homebrew manage the npm package installation for you.
Terminal.sh# EACCESS error reference: https://docs.npmjs.com/getting-started/fixing-npm-permissions
# Install Homebrew # Reference: brew.sh # Ensures NPM is installed properly to avoid EACCESS errors
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install npm # Reference: brew.sh
brew install node
# Install firebase-tools
npm install -g firebase-tools # Non-recurring task # Also updates to newest version (see notice)
Add sudo
prior to command it should work
sudo npm -g i firebase-tools
Try run the command as
su root
if you are using ubuntu. For me, just use sudo, did not work. I'm using Ubuntu 18.x.x and I was trying install firebase through npm
Easy Way:
Back up your computer.
if you have Permission issue run first this
sudo chown -R $USER /usr/local/lib/node_modules
then 2nd
1)- mkdir ~/.npm-global
2)- npm config set prefix '~/.npm-global'
3)- export PATH=~/.npm-global/bin:$PATH
4)- source ~/.profile
5)- npm install -g jshint
6)- NPM_CONFIG_PREFIX=~/.npm-global
This looks like an issue with the permissions of modules you have npm installed. This is something lots of developers run into, and npm actually has some documentation on how to resolve it. Once you go through that, try again (you may need to re-install firebase-tools
) and things should work.
I had the same issue, and I fixed it by doing chmod 755
on all the files in the configstore
directory