Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

flutter doctor warns that dart on your path is not in the Flutter SDK

ErrorWarning: `dart` on your path resolves to C:\dart-sdk\bin\dart.exe, which is not inside your current Flutter SDK checkout at C:\flutter.

Short answer

flutter doctor found a dart program on your PATH that lives outside the Flutter SDK folder, usually a separate Dart SDK installed earlier in the list. Put the Flutter bin folder at the front of PATH, open a new terminal, and confirm that dart now comes from Flutter.

  • Applies to Flutter 3.35, Dart 3.9, Windows 11, macOS 15, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    List every dart on PATH in order. The first one is what runs. If it is not under your Flutter folder, the warning is correct.

    where dart            # Windows
    which -a dart         # macOS and Linux
  2. 2Match what you see, then jump to its fix

    1. 1The first line of where or which -a points at a standalone Dart folder, not flutter/binA separate Dart SDK comes before flutter/bin on PATHFix
    2. 2You already edited PATH but where or which -a still shows the old orderThe terminal or IDE was not restarted after the changeFix
    3. 3The warning names a Flutter path you did not expect, for example an old cloneflutter on PATH belongs to a different Flutter checkoutFix

What does the error look like?

  • Warning: `dart` on your path resolves to C:\dart-sdk\bin\dart.exe, which is not inside your current Flutter SDK checkout at C:\flutter.
  • Consider adding C:\flutter\bin to the front of your path.

Cause 1 of 3

A separate Dart SDK comes before flutter/bin on PATH

1Check

Flutter ships its own Dart inside the SDK. If another Dart SDK folder is earlier in PATH, the shell uses that one, and flutter doctor reports it with the advice to move the Flutter bin folder to the front.

flutter doctor -v
echo $PATH          # use: echo %PATH% in cmd.exe

2Fix

Move the Flutter bin folder to the top of PATH. On Windows, edit the user Path in Environment Variables and use Move Up until the Flutter entry is first. On macOS or Linux, put it before $PATH in your shell profile.

# macOS (~/.zprofile) or Linux (~/.bashrc)
export PATH="$HOME/develop/flutter/bin:$PATH"

3Verify

Open a new terminal. dart now resolves inside the Flutter folder and flutter doctor no longer prints the warning.

which -a dart
flutter doctor

Confirmed by docs.flutter.dev

Did this fix it?

Cause 2 of 3

The terminal or IDE was not restarted after the change

1Check

A running terminal keeps the PATH it started with. The Flutter guide says to close and reopen all terminal sessions and IDEs after changing it.

echo $PATH     # compare with the value you saved in the profile

2Fix

Close every terminal and the IDE, then open them again. On macOS and Linux a new session reads the profile file again.

# close and reopen the terminal, then:

3Verify

The order shown by which -a now matches the profile.

flutter --version && dart --version

Confirmed by docs.flutter.dev

Did this fix it?

Cause 3 of 3

flutter on PATH belongs to a different Flutter checkout

1Check

The same check runs for the flutter command, so it can point at another copy of the SDK than the one whose doctor you are running.

where flutter         # Windows
which -a flutter      # macOS and Linux

2Fix

Keep one Flutter folder on PATH, in front, and remove the entry of the old one.

# shell profile: keep only this line for Flutter
export PATH="$HOME/develop/flutter/bin:$PATH"

3Verify

One flutter and one dart are listed, both inside the same folder.

which -a flutter
which -a dart

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • Do not install a separate Dart SDK next to Flutter. Use the dart command that comes with Flutter.
  • Keep exactly one Flutter folder on PATH.
  • After any PATH change, restart terminals and the IDE.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.