thgh / vercel-sapper

Vercel builder for Sapper with SSR enabled
MIT License
191 stars 25 forks source link

Warning: Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. #61

Closed migbash closed 3 years ago

migbash commented 3 years ago

image

kaboomdigital commented 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.

migbash commented 3 years ago

@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:

image

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 :/

thgh commented 3 years ago

BAD_GATEWAY, that's probably related to https://github.com/thgh/vercel-sapper/issues/56#issuecomment-762806855

fred-snyder commented 3 years ago

@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.

migbash commented 3 years ago

@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?

fred-snyder commented 3 years ago

@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?

Yes. All the default settings work. I use the Vercel CLI.

migbash commented 3 years ago

@fred-snyder huh ๐Ÿค”, ok let me have a try once more.

thgh commented 3 years ago

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 ๐Ÿ˜ƒ

nosirbekdev commented 1 year ago

image

django build warning?

emanuel-flexo commented 1 year ago

resolved this?

Shahan786developer commented 11 months ago

image

django build warning?

Shahan786developer commented 11 months ago

I when deploy my django, project i cant see my static files, can anyone help??

jomhar823 commented 10 months ago

image

django build warning?

i also have the same problem can you provide me an assistance for that? thanks

1atul0 commented 10 months ago

image 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:- image

thgh commented 10 months ago

It's probably best to create an issue in the Vercel org. This repo is related to sapper.

Giasinit commented 8 months ago

is there any updates?

Arpit-Yadav-Dev commented 7 months ago

Screenshot 2024-02-16 215244

Facing the same issue i uploaded my express app and build folder is inside the express app . Don't know what's the issue .

Giasinit commented 7 months ago

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": "*"
            }
        }
    ]
}
Ernesto-Alves67 commented 4 months ago

I'm getting this error, trying to host an API on FastAPI.

imagem

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)

Repo: https://github.com/Ernesto-Alves67/fastAPI_teste

slightlee commented 4 months ago

I'm getting this error, trying to host an API on FastAPI. ้‡่ฏ• ย ย  ้”™่ฏฏๅŽŸๅ› 

imagem

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)

Repo: https://github.com/Ernesto-Alves67/fastAPI_teste

I also encountered the same problem when using FastAPI. Have you resolved it ?

Ernesto-Alves67 commented 4 months ago

I couldn't resolved yet.

Shamonti commented 4 months ago

Screenshot 2024-02-16 215244

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.

Ernesto-Alves67 commented 4 months ago

Screenshot 2024-02-16 215244 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.

caiomadeira commented 3 months ago

is there a link to the new discussion?

nisharga commented 3 months ago

Still facing same issue and wonder no one can fix it :octocat:

slightlee commented 3 months ago

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.

Innavoj commented 3 months ago

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