-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
styled-components not working. #1009
Comments
Can you provide a minimal version of your code? for example, for |
NOTE looks like rebass is incompatible with snowpack which is how I'm running the below. I managed to get the "hello rebass" example working in a create react app. @Howard86 I just started having a look at rebass and the following reproduces this issue: https://github.com/justin-calleja/rebass-styled-components Thanks Same issue if I install
It is requiring this: module.exports = require("./emotion-theming.cjs.dev.js"); Whose contents is this: 'use strict';
throw new Error("`emotion-theming` has been removed and all its exports were moved to `@emotion/react` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/react'`."); Looks like this page needs updating: https://rebassjs.org/getting-started/ Then if I install import { ThemeProvider } from '@emotion/react'; I get the same error like the others:
|
hey @justin-calleja In general, the following works pretty well with my next.js project. import { Box } from "rebass/styled-components"; I have quickly tried your project and got the same error. I am afraid this is probably not related to
|
styled-components does not work. Emotion works.
The versions are
I have a simple component like below, when I import the styled-components version it crashes. Whereas if I do an import without styled-components(emotion). It works allright. This is for SSR with nextJS configured with styled-components.
The componet is
The error is :
The text was updated successfully, but these errors were encountered: