2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

zsh: command not found: firebaseのエラーが出て、Firebaseが見つからない

Last updated at Posted at 2024-10-13

はじめに

初歩的なことですが、時間がかかってしまったので記事に残します。

問題

Firebaseが見つからない 
zsh: command not found: firebase

% npm install -g firebase-tools

added 642 packages in 28s

70 packages are looking for funding
  run `npm fund` for details
npm notice 
npm notice New minor version of npm available! 10.5.0 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice Run npm install -g npm@10.9.0 to update!
npm notice 

上記でインストールしているにも関わらず、Firebaseが見つからない

% firebase login
zsh: command not found: firebase

解決方法

zshrcに、環境変数を設定
シェルはこの場所を含めてfirebaseコマンドを検索できるようになる

% vi ~/.zshrc
export PATH=$PATH:/Users/ユーザー名を入力/.npm-global/bin

firebaseコマンドが実行できるようになった

% firebase --version   
13.22.0

おわりに

環境変数の意味、設定方法が分かりました!

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?