Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@emotion/serialize/types/index.ts TS2411: error #3136

Closed
ovaris opened this issue Dec 8, 2023 · 17 comments
Closed

@emotion/serialize/types/index.ts TS2411: error #3136

ovaris opened this issue Dec 8, 2023 · 17 comments

Comments

@ovaris
Copy link

ovaris commented Dec 8, 2023

Current behavior:

TypeScript compiler throws numerous errors related to CSSInterpolation:

node_modules/@emotion/serialize/types/index.d.ts:37:18 - error TS2411: Property 'zoom' of type 'Zoom | readonly NonNullable<Zoom | undefined>[] | ("normal" | "reset" | (string & {}) | Globals)[] | undefined' is not assignable to 'string' index type 'CSSInterpolation'.

Found 825 errors in the same file, starting at: node_modules/@emotion/serialize/types/index.d.ts:37

Using TS version 5.3.2

Not sure what changed but suddenly index.d.ts appered under node_modules/@emotion/serialize/types even though we have been using same version 1.1.2 all the time (or actually it's dependency of react-select)

└─┬ react-select@5.7.2
└─┬ @emotion/react@11.11.1
├─┬ @emotion/babel-plugin@11.11.0
│ └── @emotion/serialize@1.1.2 deduped
└── @emotion/serialize@1.1.2

@ovaris ovaris changed the title @emotions/serialize/types/index.ts TS2411: error @emotion/serialize/types/index.ts TS2411: error Dec 8, 2023
@Andarist
Copy link
Member

Andarist commented Dec 8, 2023

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

@mitchhentgesspotify
Copy link

mitchhentgesspotify commented Dec 8, 2023

Hey, I'm seeing the same thing! I've got a repro repo over here for you, Andarist

EDIT: I'm seeing this error after updating my project's yarn.lock. However, neither @emotion dependencies neither typescript itself were included in the updates, so it's unclear what is causing this to fail. I'm not sure that this is an issue with @emotion/stylize, necessarily. Hmm.

@kamenminkovcom
Copy link

This is causing the issue - frenic/csstype#189

This was referenced Dec 8, 2023
@sg785-sakshi
Copy link

Current behavior:

TypeScript compiler throws numerous errors related to CSSInterpolation:

node_modules/@emotion/serialize/types/index.d.ts:37:18 - error TS2411: Property 'zoom' of type 'Zoom | readonly NonNullable<Zoom | undefined>[] | ("normal" | "reset" | (string & {}) | Globals)[] | undefined' is not assignable to 'string' index type 'CSSInterpolation'.

Found 825 errors in the same file, starting at: node_modules/@emotion/serialize/types/index.d.ts:37

Using TS version 5.3.2

Not sure what changed but suddenly index.d.ts appered under node_modules/@emotion/serialize/types even though we have been using same version 1.1.2 all the time (or actually it's dependency of react-select)

└─┬ react-select@5.7.2
└─┬ @emotion/react@11.11.1
├─┬ @emotion/babel-plugin@11.11.0
│ └── @emotion/serialize@1.1.2 deduped
└── @emotion/serialize@1.1.2

Having the same issue as well

@heath-freenome
Copy link

I'm seeing the same thing in my builds now too. Any idea when the fix will be released?

@therockerline
Copy link

I have the same error in my repository, I saw a pull request for csstype in range, when is it accepted?

Cerber-Ursi added a commit to Cerber-Ursi/emotion that referenced this issue Dec 15, 2023
@suren-atoyan
Copy link

I have the same issue!

@w9nder
Copy link

w9nder commented Dec 18, 2023

Same issue here.

1 similar comment
@heegu0311
Copy link

Same issue here.

@kauan-carvalho-code
Copy link

I was experiencing the same issue, and it was resolved by setting the skipLibCheck property to true within the compilerOptions in the tsconfig file.

@ERICWILFER
Copy link

same issue here

@heegu0311
Copy link

heegu0311 commented Dec 21, 2023

@kauan-carvalho-code Thanks. In my case, my IDE(webstorm) worked too slowly to keep coding.
It was probably due to so many errors(more than 800). After changing skipLibCheck to true, IDE is working fine now. 😃

@yanachrnsh
Copy link

same issue

@heath-freenome
Copy link

@kauan-carvalho-code Thanks. In my case, my IDE(webstorm) worked too slowly to keep coding. It was probably due to so many errors(more than 800). After changing skipLibCheck to true, IDE is working fine now. 😃

I tried doing that for my builds and it still fails

@sacummings91
Copy link

sacummings91 commented Dec 22, 2023

I'm pretty sure it's cuz skipLibCheck: true doesn't apply if you are importing types into your application code.

We have skipLibCheck: true in our tsconfig and it fails for us in our application code because we are using react-select in there and importing some react-select types which ultimately import types from csstype

@sacummings91
Copy link

If anyone is looking for a workaround I used the solution in this comment pinning csstype to 3.1.2 for now. frenic/csstype#189 (comment)

@emmatown
Copy link
Member

Fixed by #3141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.