-
Notifications
You must be signed in to change notification settings - Fork 27
Replace Next.js with Vercel native serverless functions #109
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "./node_modules/knip/schema.json", | ||
| "entry": ["api/**/*.ts"] | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,18 @@ | ||
| { | ||
| "extends": "@tsconfig/next/tsconfig.json", | ||
| "compilerOptions": { | ||
| "allowJs": false, | ||
| "tsBuildInfoFile": "node_modules/.cache/.tsbuildinfo", | ||
| "forceConsistentCasingInFileNames": true, | ||
| "target": "esnext", | ||
| "module": "esnext", | ||
| "moduleResolution": "bundler", | ||
| "noEmit": true, | ||
| "strict": true, | ||
| "moduleResolution": "bundler" | ||
| "forceConsistentCasingInFileNames": true, | ||
| "skipLibCheck": true, | ||
| "lib": ["esnext"], | ||
| "allowJs": false, | ||
| "incremental": false, | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true | ||
| }, | ||
| "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], | ||
| "include": ["**/*.ts"], | ||
| "exclude": ["node_modules"] | ||
| } |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a 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. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://openapi.vercel.sh/vercel.json", | ||
| "framework": null | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!