Wrote path for flutter SDK
with $HOME/.zshrc
and with export PATH="$PATH:/Users/prettygirl/FlutterSDK/flutter/bin"
It went ok and even the flutter doctor
worked.
Then when I close the terminal
and reopen it, then it shows .zshrc permission denied
, but I have given full disk access
to the terminal
.
/Users/prettygirl/.zprofile:export:1: not valid in this context: PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/prettygirl/FlutterSDK/flutter/bin /Users/prettygirl/.zshrc:1: permission denied: /Users/prettygirl/FlutterSDK/flutter/bin
now when I run flutter doctor
it says zsh: command not found: flutter
like I never updated the SDK path.
Opened .zshrc
file with a text editor
and it contains the path and opens fine.
Why is that?
CodePudding user response:
you need to set the SDK path in the .zshrc file
open .zshrc file
vim .zshrc
add a line on this file
export PATH="$PATH:[PATH_OF_FLUTTER_GIT_DIRECTORY]/bin"
close terminal and reopen the terminal check
echo $path
if a path is showing then try other commands related to flutter.
flutter doctor