-
Notifications
You must be signed in to change notification settings - Fork 27k
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
next-swc: SVG <path>
identified as usage of node:path
import
#45561
Comments
Oh I think this can be an issue of swc core modules. I'll check it tomorrow. |
swc-project/swc#6911 will fix this |
**Related issue:** - vercel/next.js#45561.
Ok great, thanks! I think this is still unreleased, but if the versioning will use semver I'm guessing it will be version We can leave this open until the Next.js version also includes this swc version. |
Fixed by #45776 |
Thanks! Confirmed that this was fixed in one of the latest canary versions! https://stackblitz.com/edit/nextjs-kzstkn?file=pages%2Findex.tsx&file=yarn.lock |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
SWC transpilation
Link to the code that reproduces this issue
https://stackblitz.com/edit/nextjs-npuob3?file=package.json
To Reproduce
yarn dev
if it doesn't start on its own)UnhandledSchemeError
error message about usage ofnode:path
in the client, although it is not used there<path>
from the JSX and observe the error message disappearDescribe the Bug
The SVG
<path>
in the React component is incorrectly identified as a usage ofnode:path
(which is actually an unused identifier), causing theUnhandledSchemeError: Reading from "node:path" is not handled by plugins (Unhandled scheme)
error message (which normally occurs when thepath
import is used in a client-side component).cc @kdy1 from #45149 (comment)
Expected Behavior
Any HTML or SVG tags which have the same name as unused identifiers should not be identified as usages of an identifier
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: