When I use @sketch-hq/sketch-file to read a sketch file. It throws "Error: Bad archive"
blvd20 opened this issue · 3 comments
This error is throwed by "node-stream-zip". It seems the sketch file is not a valid zip file.
But I can still use the sketch application to open that file.
So what's wrong with it?
Interesting - could you share a bit more information? What version of Sketch produced the file? Are you able to share the file itself, if it isn't sensitive?
Interesting - could you share a bit more information? What version of Sketch produced the file? Are you able to share the file itself, if it isn't sensitive?
I download the sketch file from https://design.facebook.com/toolsandresources/devices/ . It seems created by old version sketch.
I just found it's not a zip file. It is a sqlite3 db file.
This article described the file structure : https://blog.icons8.com/articles/what-is-inside-of-a-sketch-file/?amp=1
Wondering if you gonna support it.
Yep, you're right - that's quite an old Sketch file. We've since moved to a JSON format quite some years ago now.
If you open that old file in Sketch, and re-save it, that should make it migrate to the new JSON format, and everything should work with the packages in this repo.