Skip to content

fix: Cannot redefine property: $$id error - #54654

Closed
shunkakinoki wants to merge 3 commits into
vercel:canaryfrom
shunkakinoki:patch-2
Closed

fix: Cannot redefine property: $$id error#54654
shunkakinoki wants to merge 3 commits into
vercel:canaryfrom
shunkakinoki:patch-2

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Aug 28, 2023

Copy link
Copy Markdown
Contributor

Fixes: #54655

action: any could already be defined, leading to a cannot redefine error on new builds, affecting server actions

Introduced by here:
https://github.com/vercel/next.js/pull/54232/files#diff-95a0d700e8c22a337ac8800d4ddf80f44c6369aa2e6acf5bd2b71632f7471c68R35-R48

@ijjk

ijjk commented Aug 28, 2023

Copy link
Copy Markdown
Member

Allow CI Workflow Run

  • approve CI run for commit: b6ddc77

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@ijjk

ijjk commented Aug 28, 2023

Copy link
Copy Markdown
Member

Allow CI Workflow Run

  • approve CI run for commit: 94b376c

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@orca-security-us orca-security-us Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@shuding shuding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, could you get a minimal reproduction of this issue so we can have a test case for it?

@jthrilly

jthrilly commented Sep 28, 2023

Copy link
Copy Markdown

@shuding - I hope this one is quite self-explanatory. I think the vercel team has to decide if those action properties should be considered reserved/read only or if other libraries can use the same properties. Or else just clarify the way this is supposed to work, generally.

I arrived at this issue because tRPC is in some cases providing its own ID, leading to Cannot redefine property: $$id. Depending on what you decide here, I can report back to the package authors that this needs to be changed, or merging this fix will restore the behaviour of NextJS < 13.4.19.

@Burry

Burry commented Jan 26, 2024

Copy link
Copy Markdown

Might be related to next-safe-action/next-safe-action#56

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Cannot redefine property: $$id in action-proxy.ts

5 participants