Closed chebread closed 1 year ago
I'll look into this. Different libraries provide various global types, some of which conflict with bun-types
in unexpected ways. It would be more useful to paste your package.json
in a codeblock instead of screenshots, ffr.
Seems there's been a regression in how we resolve npm versions. We're accidentally installing an outdated version of @types/react
.
For now, running bun add @types/react@latest
will fix the issue.
@colinhacks, React import error fixed. However, this error has not been resolved yet. The error seems to be that tsconfig can't read lib or bun-types doesn't work well as mentioned above. It is right?
What version of Bun is running?
0.5.5
What platform is your computer?
Darwin 22.3.0 arm64 arm
Bug
I am developing a React project based on Typescript using Bun. I switched from JavaScript-based to Typescript. I imported useState, but a Typescript error occurs in VSCode. I don't get any errors even when I connect from localhost. It's just VSCode's React Import Typescript error.
I have this bug.
My environment setup is like this:
tsconfig.json
package.json
Does anyone know about this bug?