mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
fix: remove "type": "module" from backend package.json to fix Vercel ESM error
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>
This commit is contained in:
parent
2e1a0d76e5
commit
5edfb27ff8
@ -3,7 +3,6 @@
|
||||
"version": "2.8.90",
|
||||
"repository": "https://github.com/hexclave/stack-auth",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"clean": "rimraf src/generated && rimraf .next && rimraf node_modules",
|
||||
"typecheck": "tsc --noEmit",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user