-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
SyntaxError when using Material-UI (@mui) components (includes emotion) #875
Comments
I think the issue is that bun is interpreting the tsconfig.json file in the npm package and that is causing other things to break |
Hi, I'm pretty sure it's not the best solution, but I would like to share how I sorted it out (manually): Edit the file node_modules/@emotion/react/dist/emotion-react.browser.esm.js [Line 406] Then you'll have your button ;) I hope it helps a bit |
@davidriverapericas Did you submit this as a patch to @emotion? |
i have the same problem |
Hi! I'm having the same issue here. Is there any solution for this? |
Hi @drush, no I haven't. I just applied that change to my local and it worked. It would be really good if somebody else can try my approach (#875 (comment))... @duy211099 & @Rodzman? Thank you all! |
Hi @davidriverapericas,
Yeah, I've tried your approach and it worked well. But I agree with you
that it isn't the best solution, just a temp workaround.
I thought about filling an issue with emotion, but I think that only bun is having it, so maybe the solution would be to analyze and change the way that bun is reading and parsing that information.
Thanks
|
Thank you @Rodzman for your comments. @Jarred-Sumner, what do you think about that? |
Hi all. I've tested again, creating a brand new React Project, this time with Bun 0.4.0 and it works perfectly, without any manual change in Emotion: $ bun create react . It works to me ;) |
Version
0.1.5
Platform
Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
What steps will reproduce the bug?
Create a new bun project using react template
bun create react cd react bun add @mui/material @emotion/react @emotion/styled
Update
src/App.jsx
(use@mui/material/Button
component):Start the
bun
server and open the browserOpen dev tools and look for the following error:
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Material-UI button element without console errors:
What do you see instead?
SyntaxError in the console
Additional information
There is a reported bug for the same issue on the discord channel but I couldn't find a related GitHub issue.
The text was updated successfully, but these errors were encountered: