-
Notifications
You must be signed in to change notification settings - Fork 12.8k
'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. #60132
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
Comments
@danikane does this only happen when the config is set to |
Yes, exactly. That's what Next.js automatically sets anyway. |
By the way should I leave the latest nightly installed? |
If you |
@danikane I've made changes to that PR that shouldn't affect typechecking, but I've packed a new version just in case: #60122 (comment) |
@iisaduan Thank you, I confirm the error is no longer reported! |
Great, thank you for confirming! |
Seems like it's happening in stable release too using |
Hi @iisaduan, sorry for the ping but should i create a new issue for it or this can fixed from this issue only? |
Same thing here |
@imranbarbhuiya Either is fine, thanks for the ping! I'm looking into it. |
Another nudge as it's been a while, any progress looking into this for |
Is there an update on when this fix will be included in |
The PR which closed this issue was in 5.7's RC; are you talking about some other fix? #60615 mentioned above was in 5.7.3. I don't think there is anything in this thread that is unreleased in some stable version. |
@jakebailey my apologies, to my knowledge there doesn't seem to be an easy way for me to check in which release a certain fix was included so I tried double checking the Regardless, I was double checking whether the fix was included in @ChromeQ can you install |
@jakebailey sorry could you share specifically which extension you have? |
I believe this is something Refined GitHub does. |
Actually I can confirm that's working for us as well - I didn't realize that my VSCode was using |
Hi,
JavaScript and TypeScript Nightly version
5.7.20240928
and subsequent versions report the above message.Next.js 13 or 14, pages router
Windows 10 with WSL2
VSCode 1.93.1
This is a React Fragment and there are several workarounds, but none of them are desired:
"jsx": "preserve"
-> to"jsx": "react-jsx"
intsconfig.json
in which case Next will slap youdiv
or whatever :)On a side note ESLint doesn't pick it up when linting, but then again it's misleading.
Thanks!
The text was updated successfully, but these errors were encountered: