-
Notifications
You must be signed in to change notification settings - Fork 346
@clerk/clerk-react should have react-dom as a peer dep #2107
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
Comments
Indeed if I force it as a peer dep using pnpm's packageExtension mechanism "pnpm": {
"packageExtensions": {
"@clerk/clerk-react": {
"peerDependencies": {
"react-dom": "*"
}
}
}
} |
Hey, thanks for the issue! That is indeed correct, it should set javascript/packages/react/package.json Lines 74 to 76 in 86ac27a
And add:
|
* chore(repo): Upgrade minimum version of react to >=18 * chore(repo): Add react-dom@>=18 peer dependency to resolve issue GH issue: #2107 * chore(repo): Add changeset * chore(localizations): Fix formatting of ru-RU
This was fixed in #2164 and will be released with a new major. You can install |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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/@[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';
butreact-dom
is not listed as a peer dep or a dep in@clerk/clerk-react
's package.json.The text was updated successfully, but these errors were encountered: