question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Select Version > 5.0.0 is incompatible with other libraries

See original GitHub issue

Are 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: image
  • The issue will come out some third party component can’t be used as JSX element: E.g my carousel component image

And for the next.js built in component will get similar error: image

Anybody having similar issue?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Methuselah96commented, Jul 8, 2022

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 with react-select.

0reactions
mikefarquharcommented, Jul 8, 2022

Also had fun with this issue this morning.

react-select depends on react-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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found