Replace Next.js with Vercel native serverless functions#109
Replace Next.js with Vercel native serverless functions#109marcalexiei wants to merge 5 commits intochangesets:masterfrom
Conversation
|
@marcalexiei is attempting to deploy a commit to the Changesets Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment fails with: |
There was a problem hiding this comment.
Added a vercel.json with a minimal configuration setting "framework": null.
This disables Vercel’s framework auto-detection, which was incorrectly identifying the project as Next.js after the migration to native serverless functions.
If the deployment still fails, check the Vercel dashboard → Project Settings → General → Framework Preset, and change it from “Next.js” to “Other”.
Note
I’m not very familiar with Vercel, so I used Claude to help identify potential causes for the log you shared.
|
Hitting |
| "homepage": "https://github.com/apps/changeset-bot", | ||
| "license": "MIT", | ||
| "repository": "https://github.com/changesets/bot", | ||
| "type": "module", |
There was a problem hiding this comment.
ts files are compiled to ESM but we don't have "type": "module", so probably the runtime is threading them as CJS so they error once they execute the first import.
Let's see if now works!
|
I fixed a couple of issues but now I'm running into this: Error: [@octokit/auth-app] appId option is required
at Object.createAppAuth (/var/task/node_modules/@octokit/auth-app/dist-node/index.js:492:11)
at getState (/var/task/node_modules/octokit-auth-probot/dist-node/index.js:188:21)
at createProbotAuth (/var/task/node_modules/octokit-auth-probot/dist-node/index.js:203:17)
at new Octokit (/var/task/node_modules/@octokit/core/dist-node/index.js:113:20)
at new OctokitWithDefaults (/var/task/node_modules/@octokit/core/dist-node/index.js:143:11)
at new OctokitWithDefaults (/var/task/node_modules/@octokit/core/dist-node/index.js:143:11)
at new Probot (/var/task/node_modules/probot/lib/probot.js:38:25)
at createProbot (/var/task/node_modules/probot/lib/create-probot.js:54:12)
at <anonymous> (/vercel/path0/api/webhook.ts:9:16)
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)I guess Vercel no longer shares secrets through |
|
Actually, that's probably not it - it's just that those secrets are configured only for the production environment. I thiiiink I have enough proof to say this branch is good to go now. I don't have more time to deal with potential broken deployment fallout right now, so I'll have to land it later. |
next.js#108nextwas only used to expose a single webhook endpoint.This PR removes it entirely in favour of Vercel's zero-config api/ directory convention.
Important
I've read about here: https://vercel.com/docs/functions,
it sounds that they should be enough for the bot use case