Chenlin Ye
Chenlin Ye

Reputation: 41

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?

Upvotes: 3

Views: 2668

Answers (1)

biggest_boy
biggest_boy

Reputation: 481

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"

Upvotes: 1

Related Questions