oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.17k stars 2.77k forks source link

Compiler Error with "jsx": "react-jsx"" in tsconfig: could not resolve jsx-dev-runtime #4227

Open daniel-le97 opened 1 year ago

daniel-le97 commented 1 year ago

What version of Bun is running?

0.7.4

What platform is your computer?

Darwin 22.5.0 arm64 arm

What steps can reproduce the bug?

changing jsx in tsconfig.json compilerOptions to "jsx": "react-jsx". `{ "compilerOptions": { // ...compilerOptions, "jsx": "react-jsx", "jsxImportSource": "nano-jsx/esm" //example library if set

}, // ...tsconfigOptions }`

What is the expected behavior?

no errors, it should be looking for '{library | react}/jsx-runtime'

What do you see instead?

error: Could not resolve: "nano-jsx/esm/jsx-dev-runtime". Maybe you need to "bun install"?

Additional information

No response

ionutvelicu commented 1 year ago

Same issue on monterey 12.6.8 using bun 0.8.1 regardless of the jsx config in tsconfig.json.

mnpenner commented 1 year ago

Sounds like the same issue as https://github.com/oven-sh/bun/issues/3768