Can’t upload deck on Anki with “malformed deck package” error

upload

I'm struggling with uploading my own deck to Anki. I found that when I tried uploading my deck on this page, it always got me the error "Malformed deck package".

So I tried downloading styled_impord from their official site, and open it, then compress it again with the following command, but got the same error.

zip -r -X new_import.zip styled_import

What made the error happening? Is this a bug? Or maybe am I wrong with compressing the deck?

Best Answer

I finally found out that zip command on macOS does not work in other platforms, and Anki must not use mac on its server.

So instead of zip, use ditto command as written in this answer:

ditto -ck --norsrc directory directory.zip

And the import finally succeeded.