-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-cdk: Replace __dirname
#26054
Labels
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p3
Comments
cyntheticfox
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 20, 2023
Can you elaborate more about this issue? What is the current behavior and what is the expected behavior? A small code snippet provided would be highly appreciated as well. |
pahud
added
p2
effort/medium
Medium work item – several days of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 20, 2023
This was referenced Jul 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p3
Describe the feature
Replace the global variable
__dirname
used with an alternative that properly handles special characters and is more widely supportedUse Case
I've seen issues in #21161, and #18470, and may be running into issues myself due to path resolution shenanigans on my system with the
__dirname
global variable.Proposed Solution
It seems feasible from my limited knowledge of Node.js to use
path.dirname(url.fileURLToPath(import.meta.url))
instead, given its introduction back in Node.js 10.12.Other Information
No response
Acknowledgements
CDK version used
2.80.0
Environment details (OS name and version, etc.)
NixOS 23.05
The text was updated successfully, but these errors were encountered: