Create PDF files from template not working when deploying app

I’m using html-to-pdf-studio and pdf-creator-node to create a PDF file from handlebars template, but while I try this feature when the app is in development, using npm start or npm test commands from the command line, everything works fine, but when I pack the app into an exe using electron-builder, the PDFs are not generated anymore and I don’t know why.

I think that pdf-creator-node has a dependency to html-pdf and this one uses PhantomJS and as I read on the github repo, PhantomJS is deprecated, but the html-to-pdf-studio does not use PhantomJS, or at least into page is not listed on dependencies tab of html-to-pdf-studio.

Does anyone know how to solve it or how to create PDF files that work when the app is deployed with other npm package? Or if anyone knows why the PDF files work when I use npm commands but do not work when I deploy the app into an exe.

Thanks everyone