My app is unable to write a docx file after being converted into a .exe file

I’ve written a simple program in Node.js / electron that reads an excel spreadsheet and then writes the data onto a docx template and creates a new docx file with when done. When I run my program with npm start it works perfectly but once I converted it into an exe file it is unable to do this function and i dont know why? The program will open and take me to the landing page i designed but these functions do not run. please help. thanks!

I’ve tried changing the permissions on the exe file to allow it access to read and write but that didnt work.