0

dart : The term 'dart' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • dart project.dart
  •   + CategoryInfo          : ObjectNotFound: (dart:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
  • 1
    Does this answer your question? [Flutter Doctor in Windows Power Shell returns error](https://stackoverflow.com/questions/49343853/flutter-doctor-in-windows-power-shell-returns-error) – Ashok Jun 13 '21 at 19:38

2 Answers2

0

It seems like you don't have the path to the dart SDK.

When you specify the path of flutter, VSCode only recognizes the flutter commands and not the dart commands. change the system environment variables (type env in the windows search bar) and add the dart sdk inside the PATH variable. The dart sdk is usually found inside /bin/cache/dart/bin.

Jaime Ortiz
  • 1,089
  • 10
  • 14
0

Edit the environment variables for your account

FLUTTER_ROOT: <wherever you downloaded flutter>

PATH: <path> + %FLUTTER_ROOT%\bin

Ashok
  • 3,190
  • 15
  • 31