2

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/#/ Commented Jun 8, 2020 at 6:23

1 Answer 1

4

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.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.