Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to static interop documentation when Wasm compilation fails #52753

Open
johnpryan opened this issue Jun 21, 2023 · 1 comment
Open

Link to static interop documentation when Wasm compilation fails #52753

johnpryan opened this issue Jun 21, 2023 · 1 comment
Labels
area-dart2wasm Issues for the dart2wasm compiler. web-js-interop Issues that impact all js interop

Comments

@johnpryan
Copy link
Contributor

johnpryan commented Jun 21, 2023

If you compile an app that uses the legacy JS interop to Wasm, you get an exception "Dart library 'dart:html' is not available on this platform". This is a proposal to link to the new staticInterop documentation as part of the error message.

flutter build web --wasm
Target dart2wasm failed: ProcessException: Process exited abnormally:
../../../../.pub-cache/hosted/pub.dev/url_launcher_web-2.0.17/lib/url_launcher_w
eb.dart:6:8: Error: Dart library 'dart:html' is not available on this platform.
import 'dart:html' as html;
       ^

This could also display a message like "For more information on how to resolve this issue, go to dart.dev/static-js-interop".

cc: @kevmoo @joshualitt

@johnpryan johnpryan added web-js-interop Issues that impact all js interop area-dart2wasm Issues for the dart2wasm compiler. labels Jun 21, 2023
@hpelitebook745G2
Copy link

any updates to this?

i've also reported similar issue with specific details to my case: #53073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler. web-js-interop Issues that impact all js interop
Projects
Status: No status
Development

No branches or pull requests

2 participants