You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two new type errors related to missing dependencies that have popped up in the past week:
Error: ./node_modules/@emotion/cache/dist/declarations/types/index.d.ts(4,23): error TS2688: Cannot find type definition file for 'node'.
Error: ./node_modules/@emotion/utils/dist/declarations/src/types.d.ts(1,33): error TS2307: Cannot find module '@emotion/sheet' or its corresponding type declarations.
To reproduce:
Start a TypeScript project with @emotion/react using a strict package manager (e.g., pnpm or Yarn PnP) and with skipLibCheck set to false
Expected behavior:
No type errors
Environment information:
react version: 18.3.1
@emotion/react version: 11.13.0
The text was updated successfully, but these errors were encountered:
I think this also breaks our types, because @emotion/cachenow references @types/node, even though our project runs in the browser and has slightly different types for built-in functions.
@Andarist hello. It looks like an ordinary hoisting problem. I've recently updated some of my emotion-related deps and stumbled upon this. In my case I used public-hoist-pattern[]=@emotion/sheet (pnpm). I think there's missing dependency on types from utils → sheet. Lifting sheet solves the issue for me.
Current behavior:
There are two new type errors related to missing dependencies that have popped up in the past week:
To reproduce:
@emotion/react
using a strict package manager (e.g., pnpm or Yarn PnP) and withskipLibCheck
set tofalse
Expected behavior:
No type errors
Environment information:
react
version: 18.3.1@emotion/react
version: 11.13.0The text was updated successfully, but these errors were encountered: