Short answer
Run npm install -g firebase-tools and read the output for errors. If it fails with EACCES, don’t use sudo: install Node with nvm and run it again. Then open a new terminal and run firebase --version. Without Node, use Firebase’s install script (curl -sL https://firebase.tools | bash) or the standalone binary.
Why the shell can’t find firebase, and the fix
01
The CLI isn’t installed on this machine
“Install the Firebase CLI via npm by running the following command: npm install -g firebase-tools This command enables the globally available firebase command.” Firebase, Firebase CLI reference
Firebase’s CLI comes from npm, not from the Firebase SDKs in your project. Install it globally once per machine, then check the version.
npm install -g firebase-tools firebase --version02
The npm install failed on permissions
“Reinstall npm with a node version manager This is the best way to avoid permissions issues.” npm, Resolving EACCES permissions errors
With Node from the official installer, global installs into a system folder fail with EACCES, and the firebase command never appears. Reinstall Node through nvm so global packages live in your home folder, then install again.
# install nvm with the command in its README (github.com/nvm-sh/nvm), then open a new terminal nvm install --lts npm install -g firebase-tools03
npm’s global bin folder isn’t on PATH
The install worked, but the shell doesn’t look where npm put the command. Find the folder, add it to PATH in ~/.zprofile (or the Path user variable on Windows), and open a new terminal. Switching Node versions with nvm also switches global packages, so install the CLI again under the new version.
npm prefix -g # the command lives in <prefix>/bin on macOS and Linux echo $PATH # add to ~/.zprofile if missing: export PATH="$(npm prefix -g)/bin:$PATH"04
No Node.js on the machine
“This script automatically detects your operating system, downloads the latest Firebase CLI release, then enables the globally available firebase command.” Firebase, Firebase CLI reference
If you don’t use Node for anything else, skip npm. On macOS and Linux the install script sets up the firebase command for you; on Windows the standalone binary opens a shell with firebase ready.
curl -sL https://firebase.tools | bash
Checked against the vendor’s docs on : Firebase CLI reference (install options); npm Docs: Resolving EACCES permissions errors.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
Related: “flutterfire: command not found” · flutter: command not found · Firebase “google-services” plugin not found · Firestore DEADLINE_EXCEEDED