Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter build web doesn't create flutter.js

I recently made a flutter application and now I want to get a web release, but when I run flutter build web and upload stored files in {root}/build/web on the host, everything is showing on chrome and firefox with that URL is an empty page with 2 console errors: _flutter is not defined GET https://web.pushers.ir/flutter.js 404 I took a look at my released files and didn't see any file named flutter.js, I tried flutter build web many times but nothing, also I tried to create another flutter project as a sample and ran flutter web build, on that sample everything was ok and flutter.js created with other released files What should I do?

  • notice: it's working with Microsoft Edge, even while there is no file named flutter.js
like image 320
Mamink Avatar asked May 20 '26 22:05

Mamink


1 Answers

Had the same issue.

Long story short: run flutter clean instead of manually deleting the /build/web folder or its content. The next build that follows will properly generate all files, including flutter.js.

More info why that is happening

like image 153
Kalex Avatar answered May 22 '26 11:05

Kalex