9

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
2
  • Where are you deploying the app? I mean, is it AWS, Azure, Google Cloud? Also, do you get any kind of console error output? Commented Aug 1, 2022 at 5:47
  • @lepsch with 2 console errors: _flutter is not defined & GET web.pushers.ir/flutter.js 404 deploying on a windows server with Plesk control panel Commented Aug 1, 2022 at 6:14

2 Answers 2

11

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

Sign up to request clarification or add additional context in comments.

Comments

0

I just copied flutter.js from a sample project release into my app release and it works

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.