"Run as JavaScript" does not work with my dart web app?


I cannot find the reason why my app does not work when compiled to JavaScript using dart2js. I have tried debugging my compiled JavaScript app using Google DevTools but found it very difficult to understand both the debugger and JavaScript code. You can find my web app on GitHub. I suspect there is a conflict between compiled JavaScript code and imported third party JS libraries such as jquery but not sure. I highly appreciate your help.


The easiest is probably to add a few print statements into your code. With binary search it should be relatively easy to figure out when the VM and dart2js diverge.

Please report back, what the reason was and/or file a bug at http://dartbug.com/ if you believe that dart2js did it wrong.

Solution (as reported by OP): “dart.js should come after [the] app script line”.

Answered By – Florian Loitsch

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

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