elwerene / libreoffice-convert

MIT License
241 stars 94 forks source link

Error converting file #42

Closed hkhoan90 closed 3 years ago

hkhoan90 commented 3 years ago

Error converting file: Error: spawn "C:\Program Files\LibreOffice\program\soffice.exe" ENOENT I installed LibreOffice in the correct location already.

AaryanAdil commented 3 years ago

Same error occurs on my side.

ilkohoffmann commented 3 years ago

I had the same problem on Windows 10 OS which has been caused by running execFile() with a quoted binary location. Removing the quotes of the location fixes that problem here. I am not sure why this check in line 40 was needed (maybe because exec() was used instead of execFile()?!):

return callback(null, process.platform === 'win32' ? '"${res[0]}"' : res[0]);

Modifying it to:

return callback(null, res[0]);

fixes that issue.

elwerene commented 3 years ago

@ilkohoffmann can you please provide a pull request?