I am running into an issue with Flutter web in which no JavaScript files are generated when running flutter build web
in any project, causing prjects to simply load a blank page.
I am currently on version 1.18.0 beta channel, and this happens with every project, even with the default counter project that Flutter generates with flutter create .
. No warnings or errors are thrown, and if I run the web project with flutter run --release -d chrome
, everything works as intended.
I have followed the steps described in the Building a web application with Flutter article from the documentation, and I remember I was able to build and host a web project with Flutter half a year ago with no issues, following the same steps.
My Flutter configuration and SDKs seem to be in place. This is what I get if I run flutter doctor -v
[√] Flutter (Channel beta, 1.18.0-11.1.pre, on Microsoft Windows [Versión 10.0.18363.836], locale es-ES)
• Flutter version 1.18.0-11.1.pre at D:\Programas\Flutter\flutter
• Framework revision 2738a1148b (4 weeks ago), 2020-05-13 15:24:36 -0700
• Engine revision ef9215ceb2
• Dart version 2.9.0 (build 2.9.0-8.2.beta)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\diego\AppData\Local\Android\sdk
• Platform android-28, build-tools 28.0.3
• Java binary at: D:\Programas\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 3.6)
• Android Studio at D:\Programas\Android Studio
• Flutter plugin version 46.0.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] Connected device (2 available)
• Web Server • web-server • web-javascript • Flutter Tools
• Chrome • chrome • web-javascript • Google Chrome 83.0.4103.61
What might be wrong here? Why are no JavaScripts files being generated?