2
votes

I ran a flutter project using the command flutter run -d web-server --web-port=5000

Here are the output logs for the same, which looks good to me:

Launching lib/main.dart on Web Server in debug mode... Syncing files to device Web Server...                                    22,524ms (!)                                        lib/main.dart is being served at http://localhost:5000

Warning: Flutter's support for web development is not stable yet and hasn't been thoroughly tested in production environments. For more information see https://flutter.dev/web

????  To hot restart changes while running, press "r". To hot restart (and refresh the browser), press "R". For a more detailed help message, press "h". To quit, press "q".

But when I am opening the url http://localhost:5000 in the browser, it is throwing error 404 not found.

1
try http://localhost:5000/#/Birju Vachhani

1 Answers

3
votes

The issue was resolved after running the following command flutter config --enable-web. I found the above solution from this link

When I created the project, web module was already there and I assumed web config is already enabled. Hence, I didn't run the above command. After doing some research and doing few trials and errors, I ran the above command and it worked.