Doubled content in the zip package produced by NextJs build plugin

I have noticed that app related content is duplicated in the zip file produced by the build.
I’m building our website https// on local with netlify CLI:

 netlify build --context deploy-preview

It creates the zip package files, but if I look inside all content in the dist\apps\biobest\.next\server seems to be duplicated:

Why is that? Seems to be a bug.
It is a huge problem because it affects the package size and we can’t add more pages to the build. Basically, it makes the package almost twice as big for nothing.

When build on netlify cloud, the package size in the warning is the same, so I expect that it is not a local problem.

Could you please have a look?


It’s not possible to duplicate content. You cannot have 2 files with the same name in the same folder. 7-zip might not be reading the zip correctly. Try extracting the files.

Hey, yes, I also thought the same. But other zip readers give the same result. Also on extracting it complains that “file exists”, and if I overwrite it (or ignore it - doesn’t matter) - the size of extracted folder is 1/2 of the one zipped.
Here 7zip:
trying in unzip
(see below)
and file sizes: left in the archive, right - unzipped:

I also tried native Windows archives functionality to exclude 7zip bugs:
(see below)

So it seems like a bug when zipping the files.

Kind regards,



I’ve asked the devs to check this.

Hi Max,

Thank you for your patience while we worked to get to the bottom of this! We’ve shipped a fix to duplicate these files before adding them to the zip. You shouldn’t run into this again moving forward, but please don’t hesitate to reach back out.

Hi Marcus,

Thanks! I’ll monitor package size just to be sure.

Kind regards,