-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction / Replay Link
n/a
Publishable key
n/a
Description
Steps to reproduce:
Building an app that depends on @clerk/clerk-react with vite results in the following error:
[vite]: Rollup failed to resolve import "react-dom" from "<redacted>/web/node_modules/.pnpm/@clerk+clerk-react@4.28.0_react@18.2.0/node_modules/@clerk/clerk-react/dist/esm/utils/useCustomElementPortal.js". This is most likely unintended because it can break your application at runtime.
Expected behavior:
vite build should work.
Actual behavior:
see the above
Environment
N/AProblem
useCustomElementPortal.tsx has import { createPortal } from 'react-dom'; but react-dom is not listed as a peer dep or a dep in @clerk/clerk-react's package.json.