-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Closed
Labels
Description
Link to the code that reproduces this issue
https://github.com/mwskwong/server-actions-build-fail
To Reproduce
- Call any server actions in a
v14.1.1-canary.10or above Next.js app
Current vs. Expected behavior
Current:
The following error is thrown when an arbitrary server action is called.
TypeError: Cannot redefine property: $$id
at Function.defineProperties (<anonymous>)
at t.registerServerReference (/server-actions-build-fail/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:141808)
at i (/server-actions-build-fail/.next/server/app/page.js:1:18906)
at 4426 (/server-actions-build-fail/.next/server/app/page.js:1:16042)
at t (/server-actions-build-fail/.next/server/webpack-runtime.js:1:127)
at 801 (/server-actions-build-fail/.next/server/app/page.js:1:16510)
at Function.t (/server-actions-build-fail/.next/server/webpack-runtime.js:1:127)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async collectGenerateParams (/server-actions-build-fail/node_modules/next/dist/build/utils.js:920:21)
at async /server-actions-build-fail/node_modules/next/dist/build/utils.js:1143:17
Expected: No error prompted
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
Binaries:
Node: 20.10.0
npm: 10.2.3
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 14.1.1-canary.12 // Latest available version is detected (14.1.1-canary.12).
eslint-config-next: 14.1.1-canary.12
react: 18.2.0
react-dom: 18.2.0
typescript: 5.3.3
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local)
Additional context
- This issue starts appearing in
v14.1.1-canary.10 - Although the reproduction calls the server action directly in an RSC and causes the project to fail to build, the issue is also observed when calling a server action upon user interactions (e.g. on button click), except it will be a runtime error instead.
- Potentially related to Error:
Cannot redefine property: $$idinaction-proxy.ts#54655