knocklabs / javascript

Official JavaScript packages for interacting with Knock
https://knock.app/
MIT License
16 stars 3 forks source link

chore(kno-7236): pin Radix dependencies to support React 16 #273

Closed mattmikolay closed 2 weeks ago

mattmikolay commented 3 weeks ago

A customer is experiencing an issue whereby their React 16 app fails to build when our React SDK is present, due to the following error:

Uncaught Error: Cannot find module 'react/jsx-runtime'

The stacktrace the customer provided indicates react/jsx-runtime is being imported by our Radix Primitives dependencies. Even though #115 updated our own packages to support React 16, we can’t control the JSX transform being used by the dependencies we pull in.

From what I can tell, Radix Primitives v1.1.0 was the first version in which they began using React’s “new” JSX transform, so pinning the Radix dependencies in our codebase to an earlier version should (hopefully) fix this.

My plan is to cut a pre-release and provide this to the customer for testing. If they confirm this fixes the issue, we can consider merging this PR into main. (Update: The customer confirmed this fixed the issue.)

linear[bot] commented 3 weeks ago

KNO-7236 [React] Investigate jsx-runtime dependency error for React 16 + SlackKit components

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: c920330b182f06ca508fdc94afca44e234eb3fe8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ---------------- | ----- | | @knocklabs/react | Patch | | nextjs-example | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
in-app-messages-example ❌ Failed (Inspect) Nov 11, 2024 4:09pm
javascript-nextjs-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 4:09pm
javascript-slack-connect-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 4:09pm
javascript-slack-kit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 4:09pm