question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Read css and cx from import { CacheProvider } from '@emotion/react'

See original GitHub issue

Our code heavily depends on custom cache, and we have multiple emotion caches in the whole application. It makes it impossible to provide our custom cache when calling createMakeStyles

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Jack-Workscommented, Aug 13, 2021

I’m glad you fixed it but it bothers me. Not everyone will have the skill to hack the lock file like you did. I can’t reproduce with yarn. Maybe there is just a simple keyword like resolve to put in the package.json that will make it work with pnpm.

Thanks, but I can’t tell how did I fix this exactally, our project is open sourced on GitHub. I guess you may be interested in it. https://github.com/DimensionDev/Maskbook/commit/294b23aa893934ce64507a7884da4760e3cd8c6c is the bad commit and in https://github.com/DimensionDev/Maskbook/commit/ec225caa515ecdad496f5550ef8f3a4bff9f1b7f I fixed it by only changing package.json and pnpm-lock.yaml. But our project is hard to set up.

1reaction
Jack-Workscommented, Aug 12, 2021

I’ve fixed this locally again by editing the lock file manually and playing around with node_modules. 😂

Read more comments on GitHub >

github_iconTop Results From Across the Web

CacheProvider - Emotion
You can look up full list of options here. import { CacheProvider, css } from '@emotion/react' import createCache from '@emotion/cache' import { prefixer...
Read more >
Emotion in React - LogRocket Blog
In this post, we will learn more about Emotion, and see the features and advantages that it can bring to our applications.
Read more >
Multiple instances of emotion overwrite each other · Issue #2210
Current behavior: We've microservice architecture so each team can have their own emotion instance, in the same time they can even import ......
Read more >
Style library interoperability - Material UI - MUI
Plain CSS; Global CSS; Styled Components; CSS Modules; Emotion; Tailwind CSS; JSS TSS ... import * as React from 'react'; import { CacheProvider...
Read more >
@emotion/react | Yarn - Package Manager
Install. yarn add @emotion/react. Usage. /** @jsx jsx */ import { jsx, css, Global, ClassNames } from '@emotion/react' render( <div css={{ color: 'hotpink'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found