firebase-tools error: EACCES: permission denied

后端 未结 8 1677
悲&欢浪女
悲&欢浪女 2021-01-14 08:37

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

相关标签:
8条回答
  • 2021-01-14 09:06

    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)
    
    0 讨论(0)
  • 2021-01-14 09:08

    Add sudo prior to command it should work

    sudo npm -g i firebase-tools
    
    0 讨论(0)
  • 2021-01-14 09:10

    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

    0 讨论(0)
  • 2021-01-14 09:12

    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
    
    0 讨论(0)
  • 2021-01-14 09:14

    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.

    0 讨论(0)
  • 2021-01-14 09:16

    I had the same issue, and I fixed it by doing chmod 755 on all the files in the configstore directory

    0 讨论(0)
提交回复
热议问题