【发布时间】:2019-11-05 02:36:13
【问题描述】:
我正在尝试运行 Flutter for web 项目,该项目运行良好,直到我运行了 flutter packages run,之后 webdev serve 给出了上述错误。我的项目位于不同的目录中,具体来说是 E:\Flutter_web_try,其中有一个 pubspec.yaml 文件。
我已经尝试过flutter pub pub packages get,重新安装flutter,停用和重新激活webdev,但这些都没有奏效。 我创建的新 flutter_web 项目也没有运行,并引发相同的错误。 我也尝试安装新版本的 Flutter,更改了 env 变量,但错误仍然保持不变。
webdev could not run for this project.
Could not find a file named "pubspec.yaml" in "C:\Users\Sanchit\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\protobuf-0.13.12".```
It should run properly, and tell me the default port at which the project is being served on, which it did before the flutter packages get command.
【问题讨论】:
-
尝试在终端中使用
flutter packages pub global run webdev serve并告诉我们输出结果。 -
No active package webdev. pub finished with exit code 65 -
尝试使用
pub global activate webdev激活包。 -
已激活,运行此命令,仍然报同样的错误