본문 바로가기

Flutter

[Flutter][해결]zsh: command not found: flutterfire

728x90

 

 

 

 

뭔데.. 왜 또 안되는데..

 

 

CLI 설치도 잘 되어있고 firebase 로그인도 되어있지만 configure 명령어를 실행 할 수 없었다.

 

 

해당 에러를 해결하기 위해서는 환경 변수 설정을 해줘야 한다고 한다.

지난번에는 어떻게 된건지.. flutterfire 연결 후 내가 뭘 잘 못 지운건지, 아무튼 PATH 설정은 다음과 같다.

 

 

PATH 설정

 

먼저 zshrc 파일을 열어준다.

 

open $HOME/.zshrc

 

 

bin 폴더가 위치한 경로를 입력 후 /.put-cache/bin 을 입력해준다.

 

export PATH="$PATH:[flutter bin폴더가 위치한 경로]:$HOME/.pub-cache/bin"

 

(예시)

export PATH="$PATH:$HOME/flutter/bin:$HOME/.pub-cache/bin"

 

 

 

터미널을 한 번 리프레시 해주고

 

soure $HOME/.zshrc

 

PATH 업데이트가 잘 반영되었는지 확인해본다.

 

echo $PATH

 

 

 

 

이제 다시 configure 명령어를 실행해보면 잘 작동되는 것을 확인할 수 있다.

 

flutterfire configure

 

휴!

 

 

 

<참고>

https://insidert.medium.com/fix-flutterfire-is-not-recognized-on-macos-8c80d47e7fde

 

Fix flutterfire is not recognized on macos

If you are new to flutter development and working on mac to develop apps, you may run into flutterfire not recognised command while adding…

insidert.medium.com

 

 

 

 

728x90