DEV Community

Discussion on: 4 Free hosting platforms for python web app with step-by-step process

Collapse
 
thunderjaw09 profile image
thunderjaw

I have a question, when I tried to deploy the web app, the error "Error: The result of "builder.build" must include an output property for "@liudonghua123/now-flask"." appears. I've tried searching for a solution but to no avail. Do you have any solutions for this?

Collapse
 
yash_makan profile image
Yash Makan • Edited

Yes, I too faced this issue a while back and what i'll suggest you is to change the vercel.json to something like this... This will probaly solve the issue and will deploy smoothly... 😁
Do let me know if this works for you, then I'll add this in the blog article as well for future readers

{
  "version": 2,
  "builds": [
      {
          "src": "*.py",
          "use": "@vercel/python"
      }
  ],
  "routes": [
      {
          "src": "(.*)",
          "dest": "main.py"
      }
  ]
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
dooryan profile image
dooryan • Edited

hi. I also encountered the same problem when using "@liudonghua123/now-flask". I've tried using "@vercel/python" I only got this error: "Due to builds existing in your configuration file, the Build and Development Settings defined in your Project
Settings will not apply." ,and when I tried to preview I got this error:

This Serverless Function has crashed.
Your connection is working correctly.
Vercel is working correctly.
500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED

how do I solve this?

Thread Thread
 
yash_makan profile image
Yash Makan

You can check the logs in vercel, this means that some error is encountered in python script. Also, if you are have app.run() in python script then also the app will not work. You have to remove app.run() as well. Moreover check the logs to find out the error...

Thread Thread
 
muditgupta68 profile image
Mudit Gupta

then apart from app.run() what should i write, should I comment it and then deploy? because I thought, app.run() initiates the running process of flask app. Do let me know.