Replies: 3 comments 4 replies
-
|
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @lopenchi! I'm Dosu and I’m helping the paste team. Paste does officially support React 19, but the TypeScript error you’re seeing is likely due to a mismatch between the version of @emotion/styled (which Paste uses under the hood) and React 19’s updated JSX typings. The version currently bundled with Paste is @emotion/styled 11.10.5, which may not fully recognize React 19’s JSX.IntrinsicElements, causing the overload to resolve to never and resulting in your error (source). If you’re using Next.js or React Server Components, you may also run into related issues due to Emotion’s lack of full RSC support. A common workaround is to create a file with the "use client" directive at the top and re-export your Paste components from there (discussion). For example: // paste-client.ts
"use client";
export * from "@twilio-paste/core";Then import from this file instead of directly from Paste. For best tree-shaking and bundle size, prefer granular exports (e.g., To fully resolve the TypeScript error, check if there’s a newer release of @emotion/styled (and related Emotion packages) that explicitly supports React 19’s JSX typings and try upgrading if possible. If not, you may need to wait for an upstream fix or patch the types locally as a temporary workaround. If you can share your exact versions of @twilio-paste/core, @twilio-paste/styling-library, @emotion/styled, react, and typescript, I can help confirm if there’s a version mismatch or suggest a more targeted solution. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
@dosu Here are the exact versions:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As mentioned in your changelog, you are already supporting react 19, but we are using react 19 and we are getting some errors
We are getting the errors when defining styled components like this one:
Error is:
Beta Was this translation helpful? Give feedback.
All reactions