pdfmake icon indicating copy to clipboard operation
pdfmake copied to clipboard

Cannot read properties of undefined (reading 'bits')

Open luicfrr opened this issue 4 years ago • 5 comments

I'm trying to use PdfMake in my NextJS project. Everything works fine in development but it's not working in the production build.

Here is a screenshot of the error I'm getting Captura de Tela 2022-10-10 às 11 18 38

I've created a repository with a simple project and all the instructions to reproduce the error.

luicfrr avatar Oct 10 '22 14:10 luicfrr

Disable swcMinify in the next Config file and everything will work! image

ghost avatar Oct 29 '22 04:10 ghost

For future searchers: in Firefox, the error is TypeError: t[e] is undefined. I didn't find my way to this issue until I tried looking for the Chrome version of the error, which is already listed above.

image

maxtheaxe avatar Nov 07 '23 06:11 maxtheaxe

Was this ever resolved? I keep getting warnings that disabling SWC Minifer will not be an option in the next major version.

maxtheaxe avatar May 22 '24 11:05 maxtheaxe

I’m using next 14 without disabling swc and it seems to be working

luicfrr avatar May 22 '24 11:05 luicfrr

Interesting, thanks. I'll report back once I've tried the same (since I'm in the process of upgrading to next 14 myself).

maxtheaxe avatar May 22 '24 13:05 maxtheaxe