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.

Typescript error: 'jsx' is declared but its value is never read. TS6133

See original GitHub issue

Hi.

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:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
NunoCardosocommented, Oct 18, 2021

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.

0reactions
Methuselah96commented, Oct 15, 2021

Were you able to verify whether you were importing anything from react-select/src/...?

Read more comments on GitHub >

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

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