Directory names that start with a dot are not being included in the zip file
See original GitHub issueBug
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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Is it bad practice for folder name to contain a dot ... - Ask Ubuntu
The short answer · Command line tools are harder to use when you have spaces in names (harder, not impossible) · Dots are...
Read more >What's so special about directories whose names begin with a ...
Directorys starting with a dot . are considered to be hidden. That means: ~/somedirectory and ~/.somedirectory are different directories.
Read more >How to create a zip file where a file name starts with a dot
1. Quote and use -LiteralPath · @LotPings Don't you need a full path to use -LiteralPath ? Do they need to do -LiteralPath...
Read more >Create/rename a file/folder that begins with a dot in Windows?
To create/rename on windows explorer, just rename to .name. - The additional dot at the end ... To create a new file begins...
Read more >Characters to Avoid in Filenames and Directories
Illegal Filename Characters · Don't start or end your filename with a space, period, hyphen, or underline. · Keep your filenames to a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@j0k3r Here you go
https://github.com/christiantakle/serverless-webpack-bug
@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