Preliminary Checks
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/@[email protected][email protected]/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
Problem
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.
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-reactwith vite results in the following error:[vite]: Rollup failed to resolve import "react-dom" from "<redacted>/web/node_modules/.pnpm/@[email protected][email protected]/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 buildshould work.Actual behavior:
see the above
Environment
Problem
useCustomElementPortal.tsx has
import { createPortal } from 'react-dom';butreact-domis not listed as a peer dep or a dep in@clerk/clerk-react's package.json.