0

I am new to flutter and SO, I tried this Flutter force higher package dependency version,

My code was

dependencies:
  intl: ^0.15.0

I replaced it with

dependency_overrides:
   intl: ^0.16.0

But I still get this error

        $ flutter pub get
        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.
Bruno
  • 4,109
  • 1
  • 9
  • 27

2 Answers2

0

This isn't a pubspec issue. You're simply executing the command from the wrong directory.

cd into the directory where your flutter project files are. That will be the folder that contains other folders like, build, android, ios, lib along with the pubspec.yaml file. Run flutter pub get from there.

neddstarkk
  • 158
  • 7
0

Go to the root of your project, where the lib and other directories exist. Then run the command. The best is to use the terminal of your code editor as the path would be same as root of your project in there.

Yudhishthir Singh
  • 2,941
  • 2
  • 23
  • 42