I’m trying to use pdf-lib in an n8n Function Node, but I keep getting the error “pdf-lib not found”. I built a custom Docker image where I installed pdf-lib, but it still doesn’t seem to work.
{Cannot find module ‘pdf-lib’ [line 1], VMError}
I also tried installing it temporarily during runtime, but I still get the same error. I know there are API services for merging PDFs, but I want to run everything locally. I also looked into Strilling PDF, but unfortunately, I couldn’t get it to work properly.
Strilling Error{The service was not able to process your request [item 0]}
If anyone knows how to set up pdf-lib (or an alternative like Sterling PDF) correctly in n8n, I’d really appreciate some help.