After upgrading from 5.3.5 to 5.4.0 I started getting the error below, I noticed that archived was replaced by bestzip and this is exactly what is failing, not sure what is causing this issue but I use hidden folders (starting with dot) for auto generated code that is packaged by serverless and bestzip may not be able to find the folder.
zip error: Nothing to do! (../onAppInstanceSyncStorage.zip)
Error --------------------------------------------------
Error: Unexpected exit code from native zip: 12
executed command 'zip --quiet --recurse-paths ../onAppInstanceSyncStorage.zip'
executed in directory '/home/runner/work/hallway/hallway/server/server/dist/onAppInstanceSyncStorage'
at ChildProcess.<anonymous> (/home/runner/work/hallway/hallway/node_modules/bestzip/lib/bestzip.js:86:13)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
I'm sorry about that error.
Is there any chance you can provide a simple project to reproduce the error? So we can track it down and update serverless-webpack or bestzip to fix the issue.
Thanks
let me try, my setup is pretty complex
Same question then: Is there any chance you can provide a simple project to reproduce the error?
@j0k3r Here you go
@christiantakle thanks for the repo, it helped me a lot.
In fact, when we zip files, we use * to match all files. But, according to the doc, it does not include dotfiles by default.
I managed to fix it by providing a list of files to the zip command and then found the fix was already provided in an other PR: https://github.com/serverless-heaven/serverless-webpack/pull/777
Most helpful comment
@j0k3r Here you go
https://github.com/christiantakle/serverless-webpack-bug