Skip to content
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

Attempting to read a file with an absolute path throws a FatalError #390

Closed
wolfadex opened this issue Jul 18, 2023 · 0 comments
Closed

Comments

@wolfadex
Copy link
Contributor

If you try to read a file using an absolute path you can get the error

-- FILE DOESN'T EXIST --------------- 
Couldn't find file at path `<absolute path>`

The code I had was trying to build the absolute path manually by getting the PWD env var and joining it with the relative path I was looking to load. Sounds like my code combined with this line was adding the current working directory twice.

Link to my code that I removed to make it work (if you need this I can add you to the repo as it's currently private).

Line of code for reference from Discord thread

path.join(process.env.LAMBDA_TASK_ROOT || process.cwd(), filePath)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant