Skip to content
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

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

Closed
wants to merge 3 commits into from

Conversation

shunkakinoki
Copy link
Contributor

@shunkakinoki shunkakinoki commented Aug 28, 2023

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
Copy link
Member

ijjk commented Aug 28, 2023

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
Copy link
Member

ijjk commented Aug 28, 2023

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

Copy link

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

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

Copy link
Member

@shuding shuding left a comment

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
Copy link

jthrilly commented Sep 28, 2023

@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
Copy link

Burry commented Jan 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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