dart pub version conflicts


I am trying to learn angulardart. I followed starter guide and using IDE intellij.

After I have cloned the repo and then opened index.html in browser directly from intellij I am getting this error

/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

I have not done any change in any file and everything is as present in the repo. Can someone please help me to understand what is missing or what I am doing wrong?


It seems to me that I asked a noob question. So I went and updated pubspec.yml file and changed dependencies version for build_runner and build_web_compilers to what is shown in error.

This has solved my problem. Leaving the question here in case someone face the same issue in future.


Sharing the updated pubspec.yml file here

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

  sdk: '>=2.0.0 <3.0.0'

  angular: ^5.0.0

  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

Answered By – shivams

Answer Checked By – Jay B. (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *