Import Error: about.json does not exist, or is invalid

AI-generated summary

The discussion revolves around an import error related to a missing or invalid about.json file when trying to install a theme component. ovanderzee describes exporting a theme from the editor, placing it in a src folder, and compressing it for version control. Upon attempting to install via “From my device,” they encounter an error indicating the about.json file is invalid or missing. RGJ suggests the issue may stem from compressing the folder with the folder name included, and advises using Git for version control instead of re-uploading the theme. ovanderzee confirms the folder was compressed with the folder name and acknowledges the advice, noting that the issue occurs when compressing the folder directly.

I am developing a theme component and I want to put it under version control.
I started off in the editor at /admin/customize/themes. I exported the edits and put the files in git in a dedicated src folder. Then I compressed the src folder using apple’s build in context menu. When I tried to install with “Form my device” I get this:

Import Error: about.json does not exist, or is invalid. Are you sure this is a Discourse Theme?

I included but did not change the about.json. When I unzip i see the same file-folder structure as in the export.

I tried quoting the null values and leaving out the properties with the null values. Still the same error message.

What can i do?

I suspect you compressed the folder including the folder name itself.

But if you want to put your theme component under version control then you should not reupload it. You should install it “From a Git repository” or even (much) better: use the Discourse Theme CLI console app to sync changes.

Indeed, when compressing the items in the folder, it works.

Thanks Richard!