3

I am new to firebase and I'm trying to install it on Ubuntu.

I've used npm install -g firebase-tools,

when I run the command firebase init I get firebase: command not found.

I've looked at this post, npm get prefix gives me /usr .

So I added export PATH="/usr/bin:$PATH" at the end of .bashrc file, But still same problem.

I also tried alias firebase="`npm config get prefix`/bin/firebase", But there is no firebase folder under /usr/bin at all, so it also fails.

when I search for firebase folder, it is located at ~/.npm/firebase.

Any idea what is going wrong?

Chenlin Ye
  • 41
  • 1
  • 4

1 Answers1

1

This worked for me.

Add this at the TOP of your .bashrc file NOT the bottom.

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

or

export PATH="/usr/bin:$PATH"
biggest_boy
  • 381
  • 4
  • 23