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

前端 未结 21 1812
野趣味
野趣味 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:32

    This worked for me on Mac (same thing the others have been posting above, just for Mac):

    1. go to your home folder in Finder (named after your user name, in my case "macbook")

    2. press cmd+shift+dot (will reveal hidden files)

    3. go the .npm-global/bin folder and copy its path (Finder menu -> View -> Show Path Bar, right click on the bin folder in the path bar -> "Copy 'bin' as Pathname")

    4. open Terminal (by default the home folder) and go nano ~/.bash_profile

    5. at the top of the file add export PATH=":$PATH" (will look similar to this: export PATH="/Users/macbook/.npm-global/bin:$PATH")

    6. save .bash_profile changes and restart Terminal, firebase command should work now

提交回复
热议问题