Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files not getting excluded when deploying from GitHub Integration #331

Open
DenverCoder1 opened this issue Oct 9, 2022 · 3 comments
Open

Comments

@DenverCoder1
Copy link

Bug report

Description

When automatically deploying from GitHub, the excluded files are not getting removed since I am getting the error:

Error: The Serverless Function "api/index" is 650.74mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size

If the images directory is excluded, the project would be significantly under this limit.

When deploying manually with vercel --prod, it works just fine. The issue only occurs with Git deployments.

I have tried both using .vercelignore containing images, and using a vercel.json with excludeFiles:

{
    "functions": {
        "api/index.php": {
            "runtime": "[email protected]",
            "excludeFiles": "{images/**,.github/**}"
        }
    },
    "routes": [{ "src": "/(.*)", "dest": "/api/index.php" }],
    "github": {
        "silent": true
    }
}

Neither of these approaches fix the issue of GitHub deployments failing.

Screenshot

image

@DenverCoder1
Copy link
Author

As a workaround, I disabled the Vercel GitHub integration and I'm using a GitHub action instead.

https://github.com/DenverCoder1/minimalistic-wallpaper-collection/blob/main/.github/workflows/vercel-deploy.yml

The vercel and vercel --prod commands work just fine, but there still seems to be a bug with the automatic builds.

@f3l1x
Copy link
Collaborator

f3l1x commented Oct 19, 2024

Hi, still facing that problem?

@DenverCoder1
Copy link
Author

It still occurs when using a connected Git repository

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants