Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zip warning: missing end signature when zipping a directory

I am running zip -r nm.zip node_modules and receiving this error:

zip warning: missing end signature--probably not a zip file (did you
zip warning: remember to use binary mode when you transferred it?)
zip warning: (if you are trying to read a damaged archive try -F)

node_modules is a directory. I am doing this within a docker container, within concourse.

like image 793
Sheen Avatar asked Nov 07 '25 09:11

Sheen


2 Answers

It means zip is expecting for a landing zip file name, provide a file name for the compressed version:

zip myfile.zip myfile
like image 138
Manuel Valdez Avatar answered Nov 10 '25 02:11

Manuel Valdez


As noted in the comment by @pmqs, this error also comes up if there is an existing file with the same name as the proposed archive name (e.g. because one of the previous processes crashed).

To fix that delete the file and re-run the zip command:

rm -vi nm.zip
zip -r nm.zip node_modules
like image 31
SultanOrazbayev Avatar answered Nov 10 '25 01:11

SultanOrazbayev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!