问题
enter image description hereI've build my flutter web app and when I run webdev serve
I've got this error message
webdev could not run for this project.
Could not find a file named "pubspec.yaml" in
"C:\Users\Karrar\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\protobuf-0.13.12".
How to fix this problem?
回答1:
It is answered here https://github.com/flutter/flutter/issues/32313
You have two options:
- use longer command instead:
flutter packages pub global run webdev serve
or
- add
protobuf: ^0.13.11
to your project dependencies and runpub get
, this will fetch missing dependency forwebdev
, then you can removeprotobuf
from your project
来源:https://stackoverflow.com/questions/56604810/why-my-flutter-web-app-does-not-run-upon-running-webdev-serve