Closed amitnovick closed 5 years ago
Update: previous error message is gone, here is the new error message:
On the dev server which create-react-app uses it works fine outside CodeSandbox, despite VSCode giving this warning:
Could not find a declaration file for module 'emotion/macro'.
change import statement from import { css } from "emotion/macro"; to import { css } from "emotion"; in style.css file it worked for me
change import statement from import { css } from "emotion/macro"; to import { css } from "emotion"; in style.css file it worked for me
Hi, thanks for trying it out! that suggestion does solve the error for me as well.
The truth is I already knew that it solves it (that's why I kept it in commented out).
However, There is still a reason why I wanted to keep this issue open, though.
There is an inconsistency between the build produced by CodeSandbox and the build I use with my dev server.
As you can see from the attached image, the build i'm using with the dev server works, whereas the CodSandbox build doesn't work.
This means that the build is not reproducible, at least across these two environments (my local dev environment and the CodeSandbox-generated environment).
Is this a CodeSandbox issue? I can't tell! there are so many moving parts at play here.
I could look into the specific versions of the dependencies I'm using and see if the exact same versions were used for the CodeSandbox environment. It could also be a build tool-specific issue, like npm, or Node.js, really I have no clue just guessing.
This one has been fixed!
This one has been fixed!
Yep just verified that the bug is gone :v:
The behaviour is consistent with create-react-app
environment I showed in previous comment:
🐛 bug report
Description of the problem
This React project works for me on my local environment. Tried to upload it and this issue happens on the provided URL below.
Might be related to this open issue at BrowserFS
Attached image showing what it looks like.
How has this issue affected you? What are you trying to accomplish?
Trying to demonstrate an issue that I raised on emotion's repo
Link to sandbox: link included
Your Environment