Downloaded component installs fine, but does not once changed/re-zipped

I’ve downloaded the category badge component, made some changes, zipped it (right click > compress on Mac) and then when I try to Install > from your device it tells me: An error occurred: Import Error: about.json does not exist, or is invalid. Are you sure this is a Discourse Theme?

Even if I just unzip it, and then zip it (without making any changes) and then try to install it it gives me the same error.

Uploading the original .zip from my Mac works fine tho.

Only differences I can see between the two:

Original is 69KB and when you right click > info it has https://github.com/discourse/discourse-category-badge-styles/tree/main https://codeload.github.com/discourse/discourse-category-badge-styles/zip/refs/heads/main in Where from

The unzipped, then zipped (without any other changes) zip is 76KB and has nothing in Where from.

Should this be working?

I recommend that you Install the Discourse Theme CLI console app to help you build themes.

2 Likes

Using that creates a skeleton but has other issues: it’s 24MB compressed (so too big, discourse won’t accept it - node_modules alone is 119MB).

I just want to make a quick edit to this theme - can’t I just download, make a change then upload it as a new component with the ‘from my device’ option?

Don’t create a zip file.

Use the cli to push the edited theme back up. It’s what it’s for and makes it very easy to edit and see what you’re changes do.

3 Likes

An alternative you could explore is to create a new component with Overrides you want.