oven-sh / bun

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

Errors with Styled-Components (TS2742) when using "bun run build" #10895

Open TobiTRy opened 1 week ago

TobiTRy commented 1 week ago

What version of Bun is running?

1.1.7+b0b7db5c0

What platform is your computer?

Darwin 23.3.0 arm64 arm

What steps can reproduce the bug?

  1. clone Github repo https://github.com/TobiTRy/fui-fancyui
  2. Install dependencies using Bun: bun i
  3. Attempt to build the project: bun run build ( "build": "tsc --p ./tsconfig-build.json && vite build")

What is the expected behavior?

The project should build successfully without TypeScript errors.

What do you see instead?

src/components/atoms/SimpleDialog/SimpleDialog.style.ts:16:14 - error TS2742: The inferred type of 'StyledDialog' cannot be named without a reference to 'react/node_modules/csstype'. This is likely not portable. A type annotation is necessary.

16 export const StyledDialog = styled(animated.div)`

image

Additional information

It works with npm