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

Use Path.join() instead - Error: ENOENT: no such file or directory, open '/...//data/Helvetica.afm' #1516

Open
alisha-monark opened this issue May 9, 2024 · 2 comments

Comments

@alisha-monark
Copy link

return fs.readFileSync(__dirname + '/data/Helvetica-Bold.afm', 'utf8');

This is giving me an error when trying to deploy to AWS Lambda using SST because of an extra slash in the path:

Error: ENOENT: no such file or directory, open '/var/task/packages/functions/src//data/Helvetica.afm'

notice the extra slash / after src.

If we use path.join() instead of + that would fix the problem

@laurent512
Copy link

please solve

@Ciaran0
Copy link

Ciaran0 commented Jul 16, 2024

Any workaround?

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

3 participants