Typescript error: 'jsx' is declared but its value is never read. TS6133
See original GitHub issueHi.
React-select 5 is triggering this typescript error for me:
TypeScript error in /Users/{...}/node_modules/react-select/src/components/containers.tsx(3,1):
'jsx' is declared but its value is never read. TS6133
1 | /** @jsx jsx */
2 | import { ReactNode } from 'react';
> 3 | import { jsx } from '@emotion/react';
| ^
4 | import {
5 | CommonPropsAndClassName,
6 | CSSObjectWithLabel,
I believe you just have to clean up / lint the code, as it is complaining that there is an unused var.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Missing "'React' is declared but its value is never read" error ...
Missing "'React' is declared but its value is never read" error when using tsconfig.json jsx setting with react-jsx value #41882.
Read more >React Error : is declared but its value is never read. [6133]
Any custom component should start with upper case. Try renaming your import from personModal to PersonModal and try to use the updated name ......
Read more >TypeScript, disable checks for `declared but its value is never ...
If you declare a variable but never use it, TypeScript will not compile, saying '<variable>' is declared but its value is never read...
Read more >How to fix a 'declared but its value is never read' false positive ...
Don't worry, you are getting this error for a valid reason i.e, you haven't used that function name in your js code. Solution....
Read more >TypeScript errors and how to fix them
error TS1371: This import is never used as a value and must use 'import type' because ... error TS6133: ' volume ' is...
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
Yes, that was the problem, my IDE added a TypeScript import to react-select/src/ without me noticing it.
Thanks for the help, I hope this will help someone later in the future.
Were you able to verify whether you were importing anything from
react-select/src/...
?