Installing the library causes emotion error #110
-
Installing this library and using it in conjuncture with either next.js or storybook causes emotions errors during the startup of dev servers. Using next.js I get this error:
Using storybook I get this error:
The weirdest thing is that this also happens when I am not even using the library. Only when I remove the library the errors go away. I have the following setup (the next.js app gets bundled with webpack5):
And I am using Storybook with webpack5:
Chakra itself works fine and is correctly setup. Only after installing this library the error occurs. Any idea what might causing it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is definitely strange, I also use next.js primarily when I use this package and haven't run into this issue. I have a few questions to clarify your setup:
This could definitely be an issue of duplicate instances of emotion, both I tried setting up a test project with the first dependencies you had listed and I'm not running into any errors. The main thing I'd recommend is trying to run a clean install by deleting |
Beta Was this translation helpful? Give feedback.
-
@JohannesKlauss it's a little hard to debug this issue without seeing how you set up your project, although from what I know of |
Beta Was this translation helpful? Give feedback.
-
Cleaning out the cache, node_modules and/or switching to yarn and run a fresh install fixed the issue. If it pops up again, I'll try to dig a bit deeper, but yeah. Just installing it shouldn't cause any errors, so I am more than confused why this happened. Npm, eh. Thanks your the support! |
Beta Was this translation helpful? Give feedback.
Cleaning out the cache, node_modules and/or switching to yarn and run a fresh install fixed the issue. If it pops up again, I'll try to dig a bit deeper, but yeah. Just installing it shouldn't cause any errors, so I am more than confused why this happened. Npm, eh. Thanks your the support!