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.

`@mantine/styles` missing `@emotion/*` dependencies

See original GitHub issue

What package has an issue

@mantine/core

Describe the bug

The actual problem seems to be in @mantine/styles but the selection dropdown doesn’t have that option.

In a project using yarn 3.2.4, I encounter the following problem when creating a custom styles cache: image

This will happen even without getting any yarn installation errors. After some investigation, I believe this is because createEmotionCache is re-exported in @mantine/core from @emotion/cache, although the former isn’t re-exporting those type definitions nor listing the emotion library as a dependency.

I’m not sure of the intention behind these changes, but including @emotion/cache as a dependency of @mantine/styles fixes the issue.

What version of @mantine/hooks page do you have in package.json?

^5.6.3

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

Add @emotion/cache to the dependencies of @mantine/styles

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
MariaSolOscommented, Nov 2, 2022

After some thought I’ve decided to reopen this so we make sure it gets fixed when merging #2842 (or performing the corresponding Mantine update).

0reactions
MariaSolOscommented, Nov 2, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing styles in production (NextJS + Chakra) #2343 - GitHub
Current behavior: Styles present in development: Are missing in ... That's why @emotion/react should be used as a peer dependency and not a ......
Read more >
@mantine/styles - npm
Mantine styles. npm. Mantine CSS-in-JS library built on top of emotion. View documentation. Installation.
Read more >
Module not found: Can't resolve '@emotion/react'
Looks like you're needing the @emotion/react package, it's no in your dependency and obviously not being included in your dependencies' ...
Read more >
@mantine/styles v5.9.5 Bundlephobia
Size of @mantine/styles v5.9.5 is 21.5 kB (minified), and 7.3 kB when compressed using GZIP. ... Ignoring the size of missing dependencies @emotion/cache, ......
Read more >
@mantine/styles - npm Package Health Analysis | Snyk
Mantine css-in-js styles engine, based on emotion For more information about how to use this ... Looks like @mantine/styles is missing a security...
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