I followed the following steps:
The Firebase CLI (Command Line Interface) requires Node.js and npm, which you can install by following the instructions on https
Make sure you're running at least version 3.5.0 of firebase-tools. To check which version you have, run:
3.5.0
firebase-tools
firebase --version
If you're running the default setup, you can update firebase-tools using:
npm install -g firebase-tools