v5.1.0 won't compile in Create React App TypeScript
See original GitHub issueThanks for using react-select!
I upgraded to v5.1.0 from v4.3.1 and I am seeing this compiler error. I am using TypeScript v4.4.3 with Create React App v4.0.3.
Are you reporting a bug or runtime error?
Failed to compile.
~/app/frontend/node_modules/react-select/src/components/containers.tsx
TypeScript error in ~/app/frontend/node_modules/react-select/src/components/containers.tsx(51,7):
Type '{ children: ReactNode; ref?: LegacyRef<HTMLDivElement> | undefined; key?: Key | null | undefined; defaultChecked?: boolean | undefined; ... 252 more ...; css: CSSObjectWithLabel; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Property 'css' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'. TS2322
49 | return (
50 | <div
> 51 | css={getStyles('container', props)}
| ^
52 | className={cx(
53 | {
54 | '--is-disabled': isDisabled,
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Error when using new 'react-jsx' TypeScript transform #10144
To fix this, while viewing a TS file, bring up the command pallet (cmd+shift+p) and type "select typescript version", select the option and...
Read more >create-react-app dependency version issues with React 18
Go back to your root folder and run npx create-react-app my-app (your app name) --template file:PATH_TO_YOUR_CUSTOM_TEMPLATE.
Read more >Troubleshooting - Create React App
If this doesn't happen, try one of the following workarounds: Check that your file is imported by your entrypoint. TypeScript will show ...
Read more >What Does Create-React-App Actually Do? | by Andrew Mc
It checks if TypeScript is a dependency after it does this. Next it begins adding to the json. First is the scripts. These...
Read more >create-react-app | Yarn - Package Manager
Create React apps with no build configuration. ... Create React App 5.0.1 is a maintenance release that improves compatibility with React 18.
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 FreeTop 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
Top GitHub Comments
I found the error. A sneaky
/src
import among the normal ones. Apologies for the false alamr. Now my app is breaking as expected from all the new typings and such.I will try.