Vercel deployment auth.js not found

I have a redwoodjs project deployed on Vercel. I ran into this issue ~1.5 months ago, where the app could no longer deploy on Vercel: ~2 minutes after building, directly after migrations, I would get this error:

Error: File not found: /vercel/path0/api/src/functions/auth.js

Strangely, trying to redeploy prior versions (that previously deployed without any issues) also led to this error. I sort of chalked this up to an error on Vercel/RedwoodJS, but the issue still persists 40 days later. Couldn’t find any similar issues online and also strange given that I use ts and not js (and that’s reflected in my Vercel settings). No local issues either.

Can you share a link to a repo or your Vercel config and toml?

Is your redwood.toml file, setting `apiUrl = "/api”

Thanks for the response. Here is redwood.toml:

`# This file contains the configuration settings for your Redwood app.

This file is also what makes your Redwood app a Redwood app.

If you remove it and try to run yarn rw dev, you’ll get an error.

For the full list of options, see the “App Configuration: redwood.toml” doc:

App Configuration | RedwoodJS Docs

[web]
title = “RedwoodApp”
port = 8910
apiUrl = “/api”
includeEnvironmentVariables = [
# Add any ENV vars that should be available to the web side to this array
# See Environment Variables | RedwoodJS Docs
]
[api]
port = 8911
[browser]
open = true
[notifications]
versionUpdates = [“latest”]`

Here are my Vercel settings:

Framework preset: RedwoodJS
Build command: yarn rw deploy vercel
Install command: corepack enable && yarn set version 3.7.0 && yarn install
NodeJS Version: 20.x

(Relevant) env variables:
ENABLE_EXPERIMENTAL_COREPACK: 1
YARN_ENABLE_IMMUTABLE_INSTALLS: false

Also we and Vercel recently fixed an issue where the way Redwood projects are built:

And

And that could explain the 2 minute build time.

I’d make sure you have the latest vercel/redwood package (was fixed a month ago)