-
Notifications
You must be signed in to change notification settings - Fork 254
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
react_1.styled is not a function #973
Comments
Side-note: Wondering if it has something to do with @babel/runtime being needed, because radix-ui uses it as dependency too: https://github.com/radix-ui/primitives/blob/main/packages/react/checkbox/package.json |
Having the same issue. I am not using radix tho. The only dependencies I am using so far are react and stitches. @rwieruch did you manage to get around this issue? |
I am not using radix either. No, didn't find a solution yet. Worst case I have to use emotion instead, but I really hope to use stitches here :) |
Hey @rwieruch |
Hi @hadihallak I went with emotion in the meantime and don't have any project at my hands anymore. Feel free to close this if no one else comes up with this issue. |
@arturbien Do you still have this issue? |
@hadihallak we went with styled-components instead |
@arturbien Thanks for your quick response. |
I get the same with brand new minimal apps. This is a brand new create-react-app application with only storybook and Stitches installed. It exports one button: Target application. It's a brand new create-react-app that imports the above button component: I tested with Emotion instead of Stitches and that does work. @hadihallak Can we reopen this? I had opened this issue which is the same, but the error is a little different since it uses stitches.config.js. |
Please re-open. Brand new minimal lib, using Stitches. On the consumer side:
|
Originally I thought this might have to do with the fact that Error on consumer side:
Repro: https://github.com/TheeMattOliver/radix-stitches-styled-not-function-repro |
Hi there, getting a similar issue in our build pipeline where we get the following error message when running our tests:
Has anyone come up with a solution or explanation of what might be causing it? Thanks. |
Any updates on this one?
|
React 18 is not supported. See #1059 We have switched over to Emotion. |
I've been experiencing the same problem. In my case, I've noticed that webpack was not including this package, and was importing the path to the .cjs module instead. So I modified my babel config with the following in order to resolve the package accordingly:
|
I took the evening to migrate my library from using styled-components to stitches. When I start Storybook, the styles get applied perfectly. However, when I build the library and install it somewhere else, I get:
react_1.styled is not a function
. (see here).This is the branch of my library where I am using stitches now: https://github.com/table-library/react-table-library/tree/feat/stitches Compared to using styled-components (or emotion), I thought I wouldn't have to change anything in the tsconfig.json or babel.config.js to make it work. Or am I wrong here? I am using rollup to bundle everything.
Thanks for your help! Really looking forward getting this to work!
The text was updated successfully, but these errors were encountered: