#TS2742: The inferred type of MyComponent cannot be named without a reference to...

1 messages · Page 1 of 1 (latest)

alpine olive
#

repo with reproducilbe test case: https://github.com/OnkelTem/_stitches-inferred

Code:

import { styled } from '@stitches/react';
export const Button = styled('button', { backgroundColor: 'gainsboro' });

TS Error:

TS2742: The inferred type of Button cannot be named without a reference to
../node_modules/@stitches/react/types/css-util
. This is likely not portable. A type annotation is necessary.

Ideas what does this even mean and how to fix it?

hybrid oxide
alpine olive
#

But... I don't use any monorepo or symlinks