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 · 0 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

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