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

bug: nextjs 15 throws error message but renders correclty #565

Closed
3 tasks done
danielleroux opened this issue Dec 11, 2024 · 3 comments
Closed
3 tasks done

bug: nextjs 15 throws error message but renders correclty #565

danielleroux opened this issue Dec 11, 2024 · 3 comments
Labels

Comments

@danielleroux
Copy link

Prerequisites

Stencil Version

4.22.3

Stencil Framework Output Target

React

Stencil Framework Output Target Version

latest (main clone)

Current Behavior

Nextjs throws the following error message:

 ✓ Ready in 2.4s
 ○ Compiling / ...
 ✓ Compiled / in 2.1s (673 modules)
[react-output-target] Failed to serialize light DOM for <my-radio-group name="myRadioGroup" value="two" suppressHydrationWarning="true" />: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, props, _owner, _store}). If you meant to render a collection of children, use an array instead. - this may impact the hydration of the component
 ⨯ [Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead.] {
  digest: '2182580047'
}
 ⨯ [Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead.] {
  digest: '2943176308'
}
 ⨯ [Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead.] {
  digest: '2943176308'
}
[react-output-target] Failed to serialize light DOM for <my-button href="#" suppressHydrationWarning="true" />: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, props, _owner, _store}). If you meant to render a collection of children, use an array instead. - this may impact the hydration of the component
 GET / 500 in 2837ms
 ✓ Compiled in 244ms (324 modules)

But the components are rendered correctly during serve dev.

Expected Behavior

Should work with latest nextjs version.

Steps to Reproduce

  1. Clone https://github.com/ionic-team/stencil-ds-output-targets
  2. pnpm install
  3. pnpm build
  4. Navigate to example-projects/nextjs-app
  5. Install latest nextjs "next": "15.1.0",
  6. pnpm start

Code Reproduction URL

https://github.com/ionic-team/stencil-ds-output-targets

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Dec 11, 2024
Copy link

ionitron-bot bot commented Dec 11, 2024

Thanks for the issue!

This project is currently maintained for the purposes of supporting Ionic Framework. At this time, only new issues & pull requests that support Ionic Framework will be prioritized. For the latest updates regarding the maintenance status of this project, please see this section of the project's README

@NSpehler
Copy link

@danielleroux This is the same issue as described here: ionic-team/stencil#6059

Apparently a fix should be under way and released today 🤞

@danielleroux
Copy link
Author

danielleroux commented Dec 11, 2024

Absolutely correct, my fault I close this one here.

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

No branches or pull requests

2 participants