mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Next.js 16.2 has a known regression (vercel/next.js#91661) where the .next/package.json CJS boundary marker is not included in the Vercel serverless function bundle. This causes Node.js to walk up to the project's package.json, see "type": "module", and treat the compiled server bundles as ESM — breaking the require() calls in the generated route files. The fix (vercel/next.js#93612) is only in canary (16.3.0-canary.17+), not yet in a stable release. Removing "type": "module" is safe here because: - All backend source is TypeScript (no .js files) - next.config is .mjs (explicit ESM) - .eslintrc is .cjs (explicit CJS) - Scripts use tsx (handles ESM regardless) - TypeScript's moduleResolution: bundler is independent of this field Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com> |
||
|---|---|---|
| .. | ||
| prisma | ||
| scripts | ||
| src | ||
| .env | ||
| .env.development | ||
| .eslintrc.cjs | ||
| .gitignore | ||
| instrumentation-client.ts | ||
| LICENSE | ||
| next.config.mjs | ||
| package.json | ||
| prisma.config.ts | ||
| tsconfig.json | ||
| vercel.json | ||
| vitest.config.ts | ||
| vitest.setup.ts | ||