-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cannot load cacert.pem #30
Comments
Following the route from the stack overflow answer and using I'm curious why it has an issue in AWS Lambda functions and what specifically causes it because it's a showstopper that would be very noticeable if it was widespread. I'm not familiar enough with AWS's environment to know what is different about our set up. |
I'm having the same issue @philiprenich, I was wondering if you found a solution? |
The problem is indeed with the webpack output not including the cacert.pem bundle. The path.join / stackoverflow solution did not make a difference for me but it might work with a file loader of some sort. Sadly my webpack knowlege is not good enough to come up with a suggestion here. I got it working by coping the node_modules code into my AWS functions container, but I understand that defeats the purpose of using a bundler. An alternative solution would be to include the cacert.pem as a json array (javascript) so it will be automatically packaged, it is not very pretty but would resolve the issue. It is important to note that the Tinify API client is not intended for use by the frontend (browser) but only in backend code. |
Hello,
I am getting the following error within AWS Lambda.
It appears that the
cacert.pem
file cannot be found and loaded. Searching around I found this SO question that seems to say that the path setup is incorrect.Client.js
doesn't usepath.join()
as the answer suggestions it should.My code is loading Tinify with a simple import, which seems to be the only difference, but I'm not sure it would matter?
Thank you for the help!
The text was updated successfully, but these errors were encountered: