Flutter Web Deployment on Apache - Uncaught SyntaxError: Unexpected token '<' - Stack Overflow

I have deployed my Flutter web build (build folder) to the following location on my RHEL 9.5 server r

I have deployed my Flutter web build (/build/ folder) to the following location on my RHEL 9.5 server running Apache:

/var/www/html/flweb/ I am trying to access my Flutter web app using: http:///flweb/ However, I am getting the following error in the browser console: flutter_bootstrap.js:1 Uncaught SyntaxError: Unexpected token '<'

Steps Taken:

  1. Checked Apache Configurations: Ensured that Apache is running and serving files correctly, it serves basic index.html with Hello World correctly.
  2. File Permissions: Set appropriate permissions for the /var/www/html/flweb/ directory.
  3. Checked Network Access: The server is accessible over HTTP.
  4. Checked Console Logs: The error suggests that flutter_bootstrap.js is not loading properly.

Questions:

  1. Has anyone encountered this issue when deploying Flutter web on Apache?
  2. Are there any specific Apache configurations needed for serving Flutter web apps?

Any help would be appreciated. Thanks!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745060089a4608914.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信