Open itayperry opened 1 year ago
import createCache from '@emotion/cache'; is supposed to work without installing @emotion/cache
This is impossible with pnpm. It's the whole point of pnpm that you can't just access random packages and hope for the best.
import createCache from '@emotion/cache'; is supposed to work without installing @emotion/cache
This is impossible with pnpm. It's the whole point of pnpm that you can't just access random packages and hope for the best.
So the right thing to do is to install pnpm i @emotion/cache
? @Andarist
Yes.
Yes.
Oh I see!! Thank you very much @Andarist ⚡️
pnpm
is getting really famous and widespread now, I think this should be added to the docs... avoiding users from experiencing this issue.
Current behavior:
import createCache from '@emotion/cache';
produces an error:To reproduce: 1) Create a new vite & react project:
pnpm create vite my-react-app --template react-ts
2) Then:pnpm install @mui/material @emotion/react @emotion/styled
3) Try importingcreateCache
:import createCache from '@emotion/cache';
Expected behavior:
import createCache from '@emotion/cache';
is supposed to work without installing @emotion/cacheEnvironment information:
react
version: "^18.2.0"@emotion/react
version: "^11.10.5"pnpm
version: "7.27.0"