firebase-tools “-bash: firebase: command not found”

前端 未结 21 1655
野趣味
野趣味 2020-11-29 01:15

Excited that Firebase\'s hosting is now out of beta. Trying to get going with with the firebase-tools package and I\'ve successfully installed it:

npm instal         


        
相关标签:
21条回答
  • 2020-11-29 01:40

    For Mac OS Sierra:

    1. $ sudo npm install -g firebase-tools
    2. To stop other Node process use $ ps aux | grep node
    3. If needed to upgrade or install emulator - $ npm install -g @google-cloud/functions-emulator
    4. Ready to go $ firebase --version
    0 讨论(0)
  • 2020-11-29 01:40

    Faced the same issue, am a newbie backend guy. Used npm install firebase-tools It doesn't install and you can't run. I tried looking at the forums and here's what worked for me: sudo npm install -g firebase-tools. Then it asks for Permissions when you firebase login. Am using Ubuntu.

    0 讨论(0)
  • 2020-11-29 01:41

    Run code below with terminal,

    alias firebase="`npm config get prefix`/bin/firebase"
    
    0 讨论(0)
  • 2020-11-29 01:41

    You should add the npm bin folder to your bash PATH variable. To do that, run:

    npm get prefix
    

    And it should output something like /home/your-username/npm-global.

    Then in your ~/.bashrc or ~/.bash_profile (if you're in a Mac) file, add:

    export PATH="/home/your-username/npm-global/bin:$PATH" # Add npm bin PATH
    

    Note the "/bin" after the npm get prefix result.

    0 讨论(0)
  • 2020-11-29 01:41

    Simply reinstall node.js. This worked for me and fire command was recognized.

    0 讨论(0)
  • 2020-11-29 01:42

    Bruno's answer did the trick, I only needed to add a dot at npm-global in Ubuntu in .bashrc:

    export PATH="/home/your-username/.npm-global/bin:$PATH" # Add npm bin PATH
    
    0 讨论(0)
提交回复
热议问题