Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory names that start with a dot are not being included in the zip file #744

Closed
onhate opened this issue Mar 25, 2021 · 5 comments · Fixed by #780
Closed

Directory names that start with a dot are not being included in the zip file #744

onhate opened this issue Mar 25, 2021 · 5 comments · Fixed by #780
Assignees
Labels
Milestone

Comments

@onhate
Copy link

onhate commented Mar 25, 2021

Bug

Description

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.

  • What stacktrace or error message from your provider did you see?
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)

Additional Data

  • Serverless-Webpack Version you're using: 5.4.0
  • Webpack version you're using: 4.44.2
  • Serverless Framework Version you're using: 1.83.3
  • Operating System: Any
@j0k3r
Copy link
Member

j0k3r commented Mar 25, 2021

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

@j0k3r j0k3r added the bug label Mar 25, 2021
@onhate
Copy link
Author

onhate commented Mar 25, 2021

let me try, my setup is pretty complex

@j0k3r
Copy link
Member

j0k3r commented Mar 25, 2021

Same question then: Is there any chance you can provide a simple project to reproduce the error?

@christiantakle
Copy link

@j0k3r Here you go

https://github.com/christiantakle/serverless-webpack-bug

@j0k3r j0k3r changed the title zip error: Nothing to do! Directory names that start with a dot are not being included in the zip file Mar 30, 2021
@j0k3r j0k3r self-assigned this Apr 8, 2021
@j0k3r
Copy link
Member

j0k3r commented Apr 9, 2021

@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: #777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants