You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: React Version Conflict with @intelllex/react-pdf
We recently migrated our app to React v18, but we encountered a dependency conflict while installing the package @intelllex/react-pdf. The error occurred because the package specifies react@^16.x as a peer dependency, which conflicts with our app's current React version ([email protected]).
Error encountered:
npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"18.3.1" from the root project npm error npm error Could not resolve dependency: npm error peer react@"16.x" from @intelllex/[email protected] npm error node_modules/@intelllex/react-pdf npm error @intelllex/react-pdf@"1.1.1" from the root project npm error
Proposed Solution
To resolve the issue and support both React 16.x and React 18.x versions without conflicts, we propose updating the peerDependencies and devDependencies in the @intelllex/react-pdf package to allow both React 16.x and React 18.x.
1. Update peerDependencies
Update the peerDependencies to support both React 16.x and React 18.x versions. This way, @intelllex/react-pdf will be compatible with both versions of React.
Make sure that the devDependencies are compatible with both React 16.x and React 18.x. The following update will ensure that the package is properly configured for React 18.x while maintaining compatibility with React 16.x.
Issue: React Version Conflict with @intelllex/react-pdf
We recently migrated our app to React v18, but we encountered a dependency conflict while installing the package @intelllex/react-pdf. The error occurred because the package specifies react@^16.x as a peer dependency, which conflicts with our app's current React version ([email protected]).
Error encountered:
npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"18.3.1" from the root project npm error npm error Could not resolve dependency: npm error peer react@"16.x" from @intelllex/[email protected] npm error node_modules/@intelllex/react-pdf npm error @intelllex/react-pdf@"1.1.1" from the root project npm error
Proposed Solution
To resolve the issue and support both React 16.x and React 18.x versions without conflicts, we propose updating the peerDependencies and devDependencies in the @intelllex/react-pdf package to allow both React 16.x and React 18.x.
1. Update peerDependencies
Update the peerDependencies to support both React 16.x and React 18.x versions. This way, @intelllex/react-pdf will be compatible with both versions of React.
"peerDependencies": { "react": "^16.x || ^18.x", "react-dom": "^16.x || ^18.x" },
2. Update devDependencies
Make sure that the devDependencies are compatible with both React 16.x and React 18.x. The following update will ensure that the package is properly configured for React 18.x while maintaining compatibility with React 16.x.
"devDependencies": { "@babel/plugin-proposal-class-properties": "^7.8.3", "babel-jest": "^26.0.1", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2", "enzyme-to-json": "^3.4.4", "identity-obj-proxy": "^3.0.0", "jest": "^26.0.1", "nwb": "0.24.x", "nwb-sass": "^0.10.2", "react": "^16.13.1 || ^18.0.0", "react-dom": "^16.13.1 || ^18.0.0" },
Please do let me know, if I should raise a PR for the same and what are the steps to do the same.
Thanks!
The text was updated successfully, but these errors were encountered: