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
Uncaught ReferenceError: _<variable_name> is not defined #77
Comments
hello, This will take time to identify the root cause. |
Yeah, I tried. |
Clone the working branch then run "y add -D @vitejs/plugin-react-swc". You will face the same error |
Just tried the repro, switch to swc, restart and I'm able to load the home page. |
The homepage is working. Follow the "Steps to reproduce". You can find the issue here: "http://localhost:3000/chat/6416e099b4652ab4149e9e42" |
Sorry didn't forgot to look at the steps. You can avoid this by pinning the version: "resolutions": {
"@swc/core": "1.3.39"
}, |
Oh actually this is also working with 1.3.44. |
I see... Ok thanks |
Describe the bug
I am using "@vitejs/plugin-react-swc".
I used the useRef hook and saved its value inside a variable named "imageContainer".
Then this happens:
Uncaught ReferenceError: _imageContainer is not defined
There isn't a single variable named "_imageContainer" in my whole project.
Then I tried the "@vitejs/plugin-react" and it's perfectly working.
I have also tried my versions of "@vitejs/plugin-react-swc" and "vite" all of them have the same issue.
But I have an old version where swc was working.
Working repo: https://github.com/NazmusSayad/messagen-client/tree/swc-working
Not working repo: https://github.com/NazmusSayad/messagen-client/tree/swc-error
Reproduction
https://github.com/NazmusSayad/messagen-client/tree/swc-error
Steps to reproduce
yarn
yarn dev
http://localhost:3000/login
You need an account now, username: "NazmusSayad", password: "hello world!"
http://localhost:3000/chat/6416e099b4652ab4149e9e42
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: