Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: No pubspec.yaml file found when running flutter for the first time

Tags:

flutter

I tried to follow Get Stated here https://flutter.io/setup-windows/

And got

>flutter run
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.

How to fix?

like image 591
Dims Avatar asked Nov 30 '22 21:11

Dims


2 Answers

You are not in the current working directory. Change the directory to your project directory and then run >>flutter run so that it could find pubspec.yaml.

like image 103
Prakash Chaudhary Avatar answered Dec 15 '22 16:12

Prakash Chaudhary


  • Download the zip file (Assuming you have already done this)
  • Extract this zip to a safe place say "E://flutter/"
  • Open CMD and goto your workspace folder where to usually create your projects.
  • Run command flutter create <project_name>
  • cd <project_name>
  • Run command flutter run

Alternatively, you can always use a good IDE like Intellij or Android Studio which will automate such configs like @Rechard said.

like image 41
Arnold Parge Avatar answered Dec 15 '22 16:12

Arnold Parge