dart pub 版本冲突

dart pub version conflicts

我正在努力学习angulardart。我遵循 starter guide 并使用 IDE intellij。

在我克隆了 repo 然后直接从 intellij 在浏览器中打开 index.html 之后我收到了这个错误

/usr/local/opt/dart/libexec/bin/pub global run webdev serve web:53322
webdev could not run for this project.
The `build_runner` version – 1.2.3 – is not within the allowed constraint – >=1.3.0 <2.0.0.
The `build_web_compilers` version – 0.4.4+3 – is not within the allowed constraint – >=1.2.0 <3.0.0.
Dart Webdev terminated

我没有对任何文件进行任何更改,所有内容都与存储库中的一样。有人可以帮助我了解缺少的内容或我做错了什么吗?

我好像问了一个菜鸟问题。所以我去更新 pubspec.yml 文件并将 build_runner 和 build_web_compilers 的依赖项版本更改为错误显示的内容。

这解决了我的问题。把问题留在这里以防将来有人遇到同样的问题。

已编辑

在此处共享更新后的 pubspec.yml 文件

name: angular_app
description: A web app that uses AngularDart
version: 0.0.1

environment:
  sdk: '>=2.0.0 <3.0.0'

dependencies:
  angular: ^5.0.0

dev_dependencies:
  angular_test: ^2.0.0
  build_runner: '>=1.3.0 <2.0.0'
  build_test: ^0.10.2
  build_web_compilers: ' >=1.2.0 <3.0.0'
  test: ^1.0.0