Closed migbash closed 3 years ago
I think Vercel is just warning the user that because the default Sapper package.json
file has a build
script attribute it skips any custom Vercel settings.
In other words: Vercel skips any custom settings you setup in the Build and Development options because of the package.json
settings. If you want to use custom Vercel settings you would have to remove the package.json
build
field.
Please correct me if I'm wrong.
@kaboomdigital makes sense
However, do I need the package.json
in order for the Sapper app to deploy on Vercel, as for the moment it does not even work:
And the Warning:...
is the only thing that is shown as to what is causing this error.
However, a simple Single Page Application with just SvelteJS works perfectly, but somehow with Sapper it is does not :/
BAD_GATEWAY, that's probably related to https://github.com/thgh/vercel-sapper/issues/56#issuecomment-762806855
@migbash Yes you do need package.json
{
"version": 2,
"builds": [
{
"src": "package.json", // as stated here in `vercel.json`
"use": "vercel-sapper"
}
]
}
I remember running into the same/similar error
Decided to re-setup my project from scratch. When I retried I realized a step in the config wasn't setup successful (setting up src/server.js
) (perhaps I accidentally discarded the changes ๐คจ)
# so don't forget to run this before deploying
# this creates a `vercel.json` and a `.vercelignore` and patches `src/server.js`
npx vercel-sapper
Hope it helps.
@thgh @fred-snyder no success with either solution. If you deploy a simple sapper npx degit "sveltejs/sapper-template#rollup" my-app
, on to vercel, does it work for you when using npx vercel-sapper
?
@thgh @fred-snyder no success with either solution. If you deploy a simple sapper
npx degit "sveltejs/sapper-template#rollup" my-app
, on to vercel, does it work for you when usingnpx vercel-sapper
?
Yes. All the default settings work. I use the Vercel CLI.
@fred-snyder huh ๐ค, ok let me have a try once more.
I will close this for now as that warning has been there for almost a year (since Vercel introduced the Project Settings in the dashboard). This project was broken for a couple months because of the .vercelignore file, but that was fixed two weeks ago ๐
django build warning?
resolved this?
django build warning?
I when deploy my django, project i cant see my static files, can anyone help??
django build warning?
i also have the same problem can you provide me an assistance for that? thanks
I also get the same error. I have used: Node.js, express.js and Ejs and dotenv file this is my github file:- https://github.com/1atul0/Basic_Banking_system and this is verce.json file:-
It's probably best to create an issue in the Vercel org. This repo is related to sapper.
is there any updates?
Facing the same issue i uploaded my express app and build folder is inside the express app . Don't know what's the issue .
So it's simple. certain libraries cannot be used in vercel. My solutions have been to change certain libraries or even use:
// vercel.json
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "vercel-sapper"
},
{
"src": "index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "index.js",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
"headers": {
"Access-Control-Allow-Origin": "*"
}
}
]
}
I'm getting this error, trying to host an API on FastAPI.
And this log on vercel's logs page.
LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html
[ERROR] TypeError: Queue.__init__() got an unexpected keyword argument 'loop'
Traceback (most recent call last):
File "/var/task/vc__handler__python.py", line 305, in vc_handler
response = asgi_cycle(__vc_module.app, body)
File "/var/task/vc__handler__python.py", line 202, in __call__
self.app_queue = asyncio.Queue(loop=loop)
I'm getting this error, trying to host an API on FastAPI. ้่ฏ ย ย ้่ฏฏๅๅ
And this log on vercel's logs page. ้่ฏ ย ย ้่ฏฏๅๅ
LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html [ERROR] TypeError: Queue.__init__() got an unexpected keyword argument 'loop' Traceback (most recent call last): File "/var/task/vc__handler__python.py", line 305, in vc_handler response = asgi_cycle(__vc_module.app, body) File "/var/task/vc__handler__python.py", line 202, in __call__ self.app_queue = asyncio.Queue(loop=loop)
I also encountered the same problem when using FastAPI. Have you resolved it ?
I couldn't resolved yet.
Facing the same issue i uploaded my express app and build folder is inside the express app . Don't know what's the issue .
Facing the same issue with my django app.
Facing the same issue i uploaded my express app and build folder is inside the express app . Don't know what's the issue .
Facing the same issue with my django app.
I think tha we shoul start a new discurssion, are nobody want help anymore.
is there a link to the new discussion?
Still facing same issue and wonder no one can fix it :octocat:
Still facing same issue and wonder no one can fix it :octocat:
I have solved this problem. This issue is related to the Node. js version of Vercel, which is an incredible thing. Use Node.js to configure the lowest version possible.
Please, can someone help me solve this problem in vercel
This Serverless Function has crashed.
Your connection is working correctly.
Vercel is working correctly.
500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED ID: fra1:lhr1::85kzp-1719464449663-222b593a5bd6