-
Notifications
You must be signed in to change notification settings - Fork 776
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
Add support for React 19, radix-ui/react-forms. While React 19 is still in beta it would be nice if the standard NPM install did not require --legacy-peer-deps #2909
Comments
Currently running into the same as well when installing react 19 |
Any timeline on this? |
This is fixed in the new release candidate versions – please let us know if you run into any other issues with React 19 |
Ran into an issue with @radix-ui/react-avatar not having react 19 in peer deps |
@HelixHEX you need to use the latest RC version of that package (1.1.0-rc.6) |
npm error code ERESOLVE |
@BenAHammond the version I mentioned is only for the avatar primitive. Different primitives are versioned differently. |
I pulled the versions by hand These are the dependencies I ended up with: They install just fine. That error I posted is from running |
Further research indicates RC versions are considered "pre-release" and won't match "post-release" "^X.0" patterns. We need to match |
React 19 support
Current Behavior
When using React 19, e.g. "react": "^19.0.0-beta-26f2496093-20240514", in package.json running "npm install" gives this error:
"npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"^16.8.0 || ^17 || ^18" from [email protected]"
This is when using the latest: "@radix-ui/react-form": "^0.0.4-rc.6"
To overcome this error: "npm install --legacy-peer-deps"
Expected behavior
run "npm install" without error
Reproducible example
Package.json
{ "private": true, "scripts": { "clean": "rimraf .next", "predev": "npm run clean", "prebuild": "npm run clean", "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@babel/runtime": "^7.24.5", "@hookform/resolvers": "^1.0.0-rc.2", "@radix-ui/react-checkbox": "^1.0.4-rc.11", "@radix-ui/react-form": "^0.0.4-rc.6", "@radix-ui/react-icons": "^1.3.0", "@stylexjs/babel-plugin": "^0.6.1", "@stylexjs/open-props": "^0.6.1", "@stylexjs/stylex": "^0.6.1", "@supabase/ssr": "latest", "@supabase/supabase-js": "latest", "@tanstack/react-query": "^5.36.0", "@tanstack/react-query-devtools": "^5.36.0", "@vercel/speed-insights": "^1.0.10", "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517", "eslint-plugin-react-compiler": "^0.0.0-experimental-c8b3f72-20240517", "next": "^14.3.0-canary.70", "react": "^19.0.0-beta-26f2496093-20240514", "react-dom": "^19.0.0-beta-26f2496093-20240514", "react-hot-toast": "^2.4.1", "sharp": "^0.33.4", "typescript": "5.4.5" }, "devDependencies": { "@babel/plugin-transform-private-methods": "^7.24.1", "@playwright/test": "^1.43.1", "@stylexjs/dev-runtime": "^0.6.1", "@stylexjs/eslint-plugin": "^0.6.1", "@stylexjs/nextjs-plugin": "^0.6.1", "@tanstack/eslint-plugin-query": "^5.35.6", "@types/node": "20.12.12", "@types/react": "18.3.2", "@types/react-dom": "18.3.0", "encoding": "^0.1.13", "eslint": "^8.56.0", "eslint-config-next": "latest", "openapi-typescript": "^5.4.0", "prettier-plugin-stylex-key-sort": "^1.0.1", "rimraf": "^5.0.7" } }
Suggested solution
update dependencies to allow installing with React 19
Additional context
Low priority since there is a work around, but wanted to get this on the radar
Your environment
The text was updated successfully, but these errors were encountered: