简体   繁体   中英

zsh: command not found: flutter when creating new folder for MacOS

I am pretty new with Flutter and encountered this strange issue. As per screenshot below, I managed to setup everything correctly and even managed to run flutter doctor command. However, when i changed my directory to a new folder and run flutter doctor , error message below will be displayed

zsh: command not found: flutter

I have also set my path in my.zshrc file accordingly and that's why the flutter doctor command was successful everytime i run it. The only issue is when I change to a new directory. I have been searching for the solution for quite some time but seems that everyone advising to set the path in.zshrc file which i believe is not the case for my situation.

在此处输入图像描述

You need to add the absolute path to the PATH variable. You have added the relative path from your home directory which is why it only works from there.

Add $HOME/Development/flutter/bin to the PATH variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM