Open lapoguidi opened 1 year ago
Ok, weird; it works for me. How are you running the production build, and what is your node version?
From the error message, it seems like there is some ESM <-> CommonJS mismatch. I used __dirname
nowhere, so it has to be in some dependency.
Hello, thanks for reply. I tried with 18 LTS: v18.6.0 then I upgraded to v18.6.2.
The error occurs when pdfmake is imported.
Anyway __dirname is used in a pdfKit dependency: https://github.com/foliojs-fork/fontkit
var trie = new UnicodeTrie(fs.readFileSync(__dirname + '/data.trie'));
I'm looking for a workaround : )
Testing in production with adapter-node gettings
The error occurs here: var trie = new UnicodeTrie(fs.readFileSync(__dirname + '/data.trie')); If this occurred also for you, how have you solved this?
Thanks
Lapo