When trying to generate the PDF, my function logs show:
2:24:09 PM: 999fae5f INFO Generating PDF...
2:24:12 PM: 999fae5f INFO error Error: Failed to launch the browser process!
/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
My code isn’t different, so I’m not sure how to proceed.
Build and functions are different, especially when functions run. I suggest this breakage is not due to the build image itself, but the changing of the default node version used in lambda functions which came into effect a few days ago.
dang, I was really hoping it was something as easy at this. maybe it still is and I’m doing something wrong, but adding this to my netlify.toml file, and I am still running into the same issues:
Maybe someone could explain this, BUT — I did add the environment variable in the Netlify UI, and it seems to be working at this point.
Why/when do Netlify UI environment variables take precedence over the netlify.toml environment variables? Or maybe I didn’t apply them correclty in my netlify.toml file?
wow! the note in one of the answers about needing versions >= 6.0.0 for nodejs14.x seems like the most relevant piece. I will probably give that a shot and see if it also works, so I’m not stuck on nodejs12.x forever.
I’m not sure I understand this. According to the Netlify documentation here, I should be able to configure the AWS_LAMBDA_JS_RUNTIME in my netlify.toml file since it’s not listed in the section explicitly telling me to configure it in the Netlify UI.
I did attempt to configure it in my netlify.toml file, and readily admit that I may have configured it incorrectly.
If you create/set an environment variable in the Netlify UI, and create/set the same variable in the netlify.toml in a repository, the build system will take the value from the netlify.toml, not the value from the UI.