You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an exception in browser console when i'm trying to do some changes in web/app/app_component.dart or any other files. That reporduce in the project https://github.com/svarl/quickstart.
VM442:1 Uncaught TypeError: window.$dartRunMain is not a function
at <anonymous>:1:8
at Object.runMain (client.js:7952)
at client.js:23849
at _wrapJsFunctionForAsync_closure.$protected (client.js:3003)
at _wrapJsFunctionForAsync_closure.call$2 (client.js:10800)
at Object._asyncStartSync (client.js:2968)
at main__closure1.$call$body$main__closure (client.js:23861)
at main__closure1.call$1 (client.js:23792)
at StaticClosure._rootRunUnary [as call$2$5] (client.js:3303)
at _CustomZone.runUnary$2$2 (client.js:12130)
at _CustomZone.runUnaryGuarded$1$2 (client.js:12058)
at _ControllerSubscription._sendData$1 (client.js:11601)
at _DelayedData.perform$1 (client.js:11754)
at _PendingEvents_schedule_closure.call$0 (client.js:11807)
at Object._microtaskLoop (client.js:3168)
at StaticClosure._startMicrotaskLoop (client.js:3174)
at _AsyncRun__initializeScheduleImmediate_internalCallback.call$1 (client.js:10675)
at invokeClosure (client.js:1188)
at MutationObserver.<anonymous> (client.js:1207)
I think the reason why this is happening is *.bootstrap.js file contains invalid appModuleUri:
if (childName === "app/app_component.css.shim.dart") { // should be main.dart
// Clear static caches.
dart_sdk.dart.hotRestart();
window.$dartRunMain = child.main;
return true;
}
The text was updated successfully, but these errors were encountered:
Confirmed this is due to app/app_component.css.shim.dart as you suggested (it should be main.dart). Likely we considered app/app_component.css.shim.dart as the primary input for the module.
One workaround is to move all but your main.dart file under your lib directory while we work on a fix.
When the entrypoint isn't the primary asset of the module we would handle the hot restart at the wrong place (the primary asset), which would either run the wrong app (if it had a main and was available) or give a runtime failure.
Fixes#2586
Environment:
How to start:
I got an exception in browser console when i'm trying to do some changes in web/app/app_component.dart or any other files. That reporduce in the project https://github.com/svarl/quickstart.
I think the reason why this is happening is *.bootstrap.js file contains invalid appModuleUri:
The text was updated successfully, but these errors were encountered: