skip to Main Content

I have a repeated terminal problem.

If i turn on the terminal and run the flutter doctor, it says command not found and it does not work.

So if i type [export PATH="$PATH:pwd/flutter/bin"] and enter the flutter doctor, it is worked

In addition, the flutter doctor was executed like this, but the version of cocoapods was low, causing continuous errors.

and then, i typeed [source ~/.zshrc] and [sudo gem install cocoapods]

I entered these and they work normally.

But I wonder if I have to go through these procedures every time I turn on the terminal.

I don’t think this problem is a problem for me to run the flutter in vscode.

Can’t I save the procedure I enter so that I don’t find any errors when I run the flutter doctor right from the terminal?

If I can’t do that, is there no problem using flutter in vscode even if I keep the current situation?

thank u

  1. type [export PATH="$PATH:pwd/flutter/bin"]
  2. type [source ~/.zshrc] and [sudo gem install cocoapods]

2

Answers


  1. Chosen as BEST ANSWER

    My problem was that I didn't create a development folder at home. Creating and re-downloading the development folder resolved most issues.


  2. Try to do this:

    • Type: open ~/.zshrc
    • Edit inside your zshrc: PATH="$PATH:$HOME/development/flutter/bin". Well in my case, the flutter folder is in $HOME/development, replace this in your corresponding path.
    • Delete all of redundant other flutter/bin in zshrc.
    • Close your text edit & run source ~/.zshrc.
    • Exit your current terminal. If you are in vscode, close your terminal & exit vscode also.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search