-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: build path compatibility with nodejs v20 #2464
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vue-router ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think we can make this so it doesn’t require __dirname anymore. The same code would probably work in all cases without win32 cases
Change the code to "const __dirname = path.dirname(fileURLToPath(import.meta.url))". |
I misunderstood it then. Sorry about that |
The expression path.dirname(new URL(import.meta.url).pathname) returns a path with a double G:\ prefix on nodejs v20, causing path resolution errors. Modify it using a ternary operator to make it compatible with nodejs v20.