Error while trying to import third party libraries.
I have no idea why am I getting this error
when trying to import the below libraries
I am already using the "use node" declarative as mentioned in the docs.
3 Replies
This is an issue with pdf-parse running on any serverless runtime - some potential solutions in here: https://gitlab.com/autokent/pdf-parse/-/issues/24
GitLab
ENOENT: no such file or directory, open './test/data/05-versions-sp...
i am using the module in my aws lambda function which is in node js. const pdf = require('pdf-parse'); this is how i am importing it but getting...
May also be relevant: https://discord.com/channels/1019350475847499849/1140512918648143902/1164417625242206299
I went through the entire thread, and I feel like the best solution is to vendor the code from the library, but I am facing difficulties in the dynamic import line.
Can you help me figure that out?
PDFJS = PDFJS ? PDFJS : require(
./pdf.js/${options.version}/build/pdf.js);
What changes do I need to implement here?
Can't get any of the solution to work, each one leads to another error. š¦