Workiva/react-dart

setClientConfiguration fails for README example

brad811 opened this issue · 2 comments

The setClientConfiguration call is failing for me, so now I'm trying the example from the README and still getting the error: Uncaught Error: Exception: react.js and react_dom.js must be loaded.

I have the html file and dart file copy-pasted from the README.
Here is my pubspec.yaml:

name: my_app
description: My app
environment:
  sdk: ^2.0.0
dev_dependencies:
  build_runner: ^1.3.0
  build_web_compilers: ^2.0.0
dependencies:
  react: ^4.5.0

I've run pub get.
I'm serving my app with webdev serve.
Dart version: Dart VM version: 2.3.0 (Fri May 3 10:32:31 2019 +0200) on "macos_x64"

Hi @brad811, we ran into a similar issue when we upgraded to build_web_compilers ^2.0.0. We opened an issue with the build package here:
dart-lang/build#2266

but apparently it is actually an issue with the dev compiler:
dart-lang/sdk#36912

In the meantime, I believe either downgrading to Dart 2.2.0 or downgrading to build_web_compilers 1.x should workaround the issue.

Hey @evanweible-wf, thanks so much for the reply! Downgrading build_web_compilers did allow me to get past that error. (However I ran into numerous other issues trying to upgrade my project to dart 2, so decided to stick with 1 for now, haha)