Skip to content
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

A React Element from an older version of React was rendered #525

Open
quick007 opened this issue Dec 10, 2024 · 1 comment
Open

A React Element from an older version of React was rendered #525

quick007 opened this issue Dec 10, 2024 · 1 comment

Comments

@quick007
Copy link

quick007 commented Dec 10, 2024

I received this error while trying to implement Vaul.

Error: A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.

Relatively basic install with react 19 and vite. I assume the issue is that it needs to be updated to react 19.

@rhengles
Copy link

After installing with pnpm, this is what I get on the terminal:

 WARN  Issues with peer dependencies found
.
└─┬ vaul 1.1.2
  └─┬ @radix-ui/react-dialog 1.1.1
    └─┬ react-remove-scroll 2.5.7
      ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
      ├── ✕ unmet peer @types/react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.8
      ├─┬ react-style-singleton 2.2.1
      │ ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
      │ └── ✕ unmet peer @types/react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.8
      ├─┬ react-remove-scroll-bar 2.3.6
      │ ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
      │ └── ✕ unmet peer @types/react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.8
      ├─┬ use-sidecar 1.1.2
      │ ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
      │ └── ✕ unmet peer @types/react@"^16.9.0 || ^17.0.0 || ^18.0.0": found 19.0.8
      └─┬ use-callback-ref 1.3.2
        ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
        └── ✕ unmet peer @types/react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.8

So it seems to me that at the very least, @radix-ui/react-dialog needs to be updated (current version at the time of this writing: 1.1.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants