React Select Version > 5.0.0 is incompatible with other libraries
See original GitHub issueAre you reporting a bug or runtime error?
A bug: Installed JSX components can’t be used after installing React-select How to reproduce:
- Create next.js App with typescript
- Install React select with version > 1.27.6 as for me I installed 1.28.1
- Install library
pure-react-carousel
(newest) - Create a simple Carousel Component import and use the following component to your carousel component:
- The issue will come out some third party component can’t be used as JSX element:
E.g my carousel component
And for the next.js built in component will get similar error:
Anybody having similar issue?
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Error: 'node-sass' version 5.0.0 is incompatible with ^4.0.0
React v17.0.1,; node-sass v5.0.0,. Then I tried to import a blank .scss file to the App component: File App ...
Read more >5.0.0 - react-select - npm
A Select control built with and for ReactJS. Latest version: 5.7.0, last published: 23 days ago. Start using react-select in your project by ......
Read more >Error node-sass version 5 0 0 is incompatible with 4 0 0
Using the command: npx create-react-app I created a blank react project on npm v7.0.7 and Node.js v15.0.1. But when I tried to import...
Read more >Change Log - Ant Design
Major Changes · Add locale directory in package, which contains commonjs locale files. · Remove dist/antd. · Change date library from Moment. ·...
Read more >TypeScript error React-Select styles - Reddit
TypeScript error React-Select styles. Hello, I'm trying to fix this TS error but I ... Types of property 'clearIndicator' are incompatible.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s not a mistake,
@types/react-transition-group
does correctly depend on@types/react
. See https://github.com/facebook/react/issues/24304, https://github.com/facebook/react/issues/24304#issuecomment-1094565891, and https://github.com/microsoft/DefinitelyTyped-tools/issues/433 for more details. Closing this since this is not an issue withreact-select
.Also had fun with this issue this morning.
react-select
depends onreact-transition-group
which has a dependency on@types/react: *
(so version 18 as it’s the latest). This turns out to be fine if running NPM v8 (probably also 7?), but causes the above issue when installing with NPM <= 6.If it’s not possible to upgrade your NPM version I can confirm that react-select v5.1.0 (haven’t checked anything above that) works fine with TypeScript and NPM v6.
There’s an issue over on react-transition-group for further reference, but it looks to me like they’ve mistakenly installed to dependencies rather than devDependencies.