react-cmdk
react-cmdk copied to clipboard
pkg: add react 19 as supported peer dependency
Fixes #46
Currently, adding react-cmdk to a project with react 19 requires --legacy-peer-deps since react-cmdk's package.json only lists react until 18.x.
https://github.com/albingroen/react-cmdk/blob/f41e75dff26126a15001987ae75131de10959283/package.json#L61-L64
# New project
❯ npm init -y
Wrote to /tmp/test-r19-cmdk/package.json:
{
"name": "test-r19-cmdk",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
# Add react 19
❯ npm i react
added 1 package, and audited 2 packages in 1s
found 0 vulnerabilities
# Add react-cmdk
❯ npm i react-cmdk
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"^19.1.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.x || ^17.x || ^18.x" from [email protected]
npm error node_modules/react-cmdk
npm error react-cmdk@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/rithvik/.npm/_logs/2025-07-06T17_22_13_252Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/rithvik/.npm/_logs/2025-07-06T17_22_13_252Z-debug-0.log
I need this too. Thz!
Would be lovely to get this merged in so I can remove my override :)