I updated to Catalina 10.15.6 and my flutter no longer runs. I tried to update my path but have no permissions to do so. flutter worked perfectly fine before the update.
dxxxgxxx#dxxx-MacBook-Pro tools % flutter doctor
zsh: command not found: flutter
dxxxgxxx#dxxx-MacBook-Pro tools % echo $SHELL
/bin/zsh
dxxxgxxx#dxxx-MacBook-Pro tools % $HOME/ .zshrc
zsh: permission denied: /Users/dxxxgxxx/
Related
I am using Mac OS. i am trying register my project in firebase and use Crashlytics in firebase to check if any crash occurs in my app I had used
curl -sL https://firebase.tools | bash
command to install flutter tools it worked fine after that I tried to run
flutterfire configure
command but it throws
zsh: command not found: flutterfire
I know that I must set $path variable but to set path variable I don't know where is my flutter tools has installed in my Mac. kindly help me to set $PATH variable
run before dart pub global activate flutterfire_cli
Once you run the following command
dart pub global activate flutterfire_cli
you should get the following output
The output is telling you the executable is not on your path variable
export PATH="$PATH":"$HOME/.pub-cache/bin"
Either run the export command in your terminal
OR
Add the command to your .zhrc file
Trying to run flutter doctor or any other command but I have this prompt
zsh: command not found: flutter
Prior the installation of oh my zsh and p10k, flutter commands were fine. I am in a Mac book air 2020 with M1 and my OS is Monterrey v12.5.1
Thanks!
Edit: Now works, my PATH was incomplete hehe
I have installed the flutter and android studio but still getting the error
tushar#racs-MacBook-Pro ~ % flutter doctor
zsh: command not found: flutter
i was trying to update the envirnmental variable on my macbook by using the "nano ~/.zshrc" command but after adding the same I am not able to run any flutter command on terminal
please help.
First, open the terminal on your mac.
Next, use the command
cat .bash_profile
and copy the content.
Then type this command into the terminal:
nano $ HOME / .zshrc
and paste the content just copied above into. Save then type
source $ HOME / .zshrc
to refresh this file. Next type
echo $ PATH
to see if the content has been updated. If successful type
flutter --version
I have installed flutter and set up the path with the zsh file for Catalina version of mac however when I run flutter doctor or flutter precache, I receive zsh: command not found: flutter. NOTE: I managed to get through these steps previously and set up android studio however I had issues when I tried to connect the simulator for Xcode and now I have had to start again.
UPDATE: When running 'flutter' or 'flutter doctor', I receive this error: Error when reading '../../../../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory and it says that pub upgrade failed after 10 tries.
How would I solve this?
When I run ls -a in the home directory, I see that there's a .bash_profile, a .zshrc file and a .zprofile (which I created previously) in there. Is this related to the problem?
This looks like you don't have flutter on your PATH in ZSH.
Open your .zshrc file in your terminal with
nano .zshrc
You should see the following at the top of the file
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
Add on the second line the path to the bin directory of your flutter SDK location, like mine:
export PATH=$HOME/bin:/usr/local/bin:$PATH:/Users/joaosoares/Projects/flutter/bin
I am using Linux. When try to run the following in Terminal:
flutter doctor --android-licenses
It's showing me the following error:
flutter: command not found
Run command whereis flutter. If that does not give you path/output then you have not set flutter path correctly.
Add the below line in your ~/.bash_profile file:
export PATH=<this is where you have to put your flutter path >/flutter/bin:$PATH
source ~/.bash_profile
now whereis fluttershould give you the correct path and you wont get
flutter: command not found
Enter this command
flutter doctor --android-licenses
and accept all licenses by entering y
for all the licenses. After that Retype
flutter doctor
You are now Good to go.
I am use IntelIdea and have same problem like another guys.<>, but this command not working if use paste copy, after few hours when i try find the right way to resolve this problem, push, on IntelIdea Tools->Flutter->Flutter Doctor and i see on command line <>. So i copy this row to terminal delete --verbose and write --android-licenses PRESS ENTER. ... O miracle i see the right result "All SDK package licenses accepted"