dint-dev / universal_html

Cross-platform 'dart:html'.
https://pub.dev/packages/universal_html
Apache License 2.0
201 stars 61 forks source link

AssetNotFoundException in 1.1.16 #16

Closed Constans closed 4 years ago

Constans commented 4 years ago

I keep getting these when trying to compile with 1.1.16

In 1.1.15 works fine.

AssetNotFoundException: universal_html|lib/prefer_sdk/html.ddc.dill     

AssetNotFoundException: universal_html|lib/prefer_sdk/js.ddc.dill       
Error compiling dartdevc module:universal_html|lib/prefer_sdk/html.ddc.js

packages/universal_html/prefer_sdk/html.dart:15:1: Error: Error when reading 'packages/universal_html/src/_sdk/html.dart': File not found
export 'dart:html'
^

Error compiling dartdevc module:universal_html|lib/prefer_sdk/js.ddc.js 

packages/universal_html/prefer_sdk/js.dart:15:1: Error: Error when reading 'packages/universal_html/src/_sdk/js.dart': File not found
export 'dart:js'
^

I use the Flutter dev channel for compiling:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.15.3, on Mac OS X 10.15.2 19C57, locale en-NL)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.1.6)
[✓] Connected device (2 available)

• No issues found!
terrier989 commented 4 years ago

Thanks for the bug report! I restored the old conditional exports and published a new version (1.1.17).

I was able to reproduce this bug in 'dartdevc'. I investigated it, but I couldn't determine any workaround that would enable us to support Node.JS / Google Cloud Functions in 'prefer_sdk' libraries.