install firebase-tools globally yarn

C++
npm install -g firebase-toolsnpm i firebase$ yarn global add firebase-tools

# After that execute this command :
# add this to ~/.bashrc or ~/.zshrc file
export PATH="$(yarn global bin):$PATH"

#and then run the command 
$ firebase login
Source

Also in C++: