【问题标题】:Angular Dart build fails after upgrade Dart升级 Dart 后 Angular Dart 构建失败
【发布时间】:2019-10-16 04:17:20
【问题描述】:

升级我的 Dart SDK 后,我总是遇到以下错误。似乎webdev 软件包已从版本 2.0.5 升级到 2.0.6。但是我现在无法运行我的项目,

"G:\Program Files\Dart\dart-sdk\bin\pub.bat" global run webdev build --output=web:build
webdev could not run for this project.
This version of webdev does not support the `build_daemon` protocol used by your version of `build_runner`.
Please add a dev dependency on `build_daemon` with constraint: >=1.0.0 <2.0.0
Process finished with exit code 78

我尝试按照错误消息提示进行操作,但无济于事!

然后,我使用 Dart 的名为 stagehand 的项目生成器生成了一个新项目,与此相同。

【问题讨论】:

    标签: dart angular-dart


    【解决方案1】:

    我昨晚经历了这个。不得不停用 webdev

    pub global deactivate webdev
    

    然后使用特定版本(在我的情况下为 2.0.1)激活

    pub global activate webdev 2.0.1
    

    我没有尝试其他版本,因为 2.0.1 取得了成功,我想完成我的示例应用程序。关于 2.0.6 应该如何修复某些问题,有一些有趣的读物,但它需要 build_daemon 版本 1,而我使用的默认 Angular dart 示例需要 0.5.0。

    【讨论】:

    • 如果您对这个问题何时得到解决感到好奇,请订阅此问题。 github.com/dart-lang/webdev/issues/408
    • 当然我会在那里添加评论
    • 看起来他们在 Angular Dart 5.3.1 中的修复工作有效。不得不将 build_runner 升级到 1.5.0
    猜你喜欢
    • 2021-11-01
    • 2015-01-12
    • 2021-12-19
    • 2021-08-13
    • 2021-05-25
    • 2016-12-02
    • 2017-05-21
    • 1970-01-01
    相关资源
    最近更新 更多