elwerene / libreoffice-convert

MIT License
241 stars 94 forks source link

Cannot read property 'O_CREAT' of undefined #29

Closed juan-t0rres closed 3 years ago

juan-t0rres commented 4 years ago

Hello,

I'm trying to use libreoffice-convert to convert some docx files I have in my react web app to pdf files. I have created a file very similar to the usage example provided in npm named converter.js.

I can open my terminal and use "node converter.js" and it will successfully output the converted file. However, whenever I try to do the same thing via my react app by importing converter.js, I get the following error message:

Uncaught TypeError: Cannot read property 'O_CREAT' of undefined at Object.<anonymous> (tmp.js:22) at Object../node_modules/tmp/lib/tmp.js (tmp.js:780) at __webpack_require__ (bootstrap:784) at fn (bootstrap:150) at Object.<anonymous> (index.js:6) at Object../node_modules/libreoffice-convert/index.js (index.js:68) at __webpack_require__ (bootstrap:784) at fn (bootstrap:150) at Module../src/providers/Converter.js (Converter.js:1) at __webpack_require__ (bootstrap:784) at fn (bootstrap:150) at Module../src/pages/Client.js (Billing.js:288) at __webpack_require__ (bootstrap:784) at fn (bootstrap:150) at Module../src/App.js (App.css?4433:45) at __webpack_require__ (bootstrap:784) at fn (bootstrap:150) at Module../src/index.js (index.css?f3f6:45) at __webpack_require__ (bootstrap:784) at fn (bootstrap:150) at Object.1 (serviceWorker.js:141) at __webpack_require__ (bootstrap:784) at checkDeferredModules (bootstrap:45) at Array.webpackJsonpCallback [as push] (bootstrap:32) at main.chunk.js:1

pedromotita commented 4 years ago

Also having this problem with libreoffice-convert in my React app

elwerene commented 3 years ago

@juan-t0rres @pedromotita Did you find a solution?