Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase command not found

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?

like image 926
Chenlin Ye Avatar asked Jun 12 '26 08:06

Chenlin Ye


1 Answers

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"
like image 60
biggest_boy Avatar answered Jun 13 '26 20:06

biggest_boy