Can't generate Theme App Extension

Hi, I’m building a Shopify App using Remix, I’ve created one Theme App Extension so far which is an App Block, and now I’m trying to generate an App Embed Block but when I run

shopify app generate extension

I can’t select Theme App Extension, it says “limit reached”, why I’m am not able to generate another Theme App Extension?

2 Likes

Hi WeNexus,

Do you already have other theme app extensions associated with this app project?

Yes Liam,

How many extentions are currently associated with this app, and are you hitting any of the limits outlined in our docs?

@Liam Yes. We finished a theme extension.“Trust Badge app block,” and want to make another. When we went to do it, it showed this error: Online Store > “Theme extension limit reached.”

Can you help me understand why it happened… as far as I know, many apps are making 40+ promotional theme extensions (e.g.: Vitals app); when we’re going to make then, why its showing limitations…

1 Like

@Liam , there is only one app block under “online store > Theme extension.”

Also, We’re not hitting any limits outlined in your doc : https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#file-and-content-size-limits

That is strange if it’s just one existing block so far and you’re looking to add a second. How large are the Liquid files for the first block?

I’ve just stumbled upon the same. I am not hitting any limits and I have only 1 app block extension currently with merely 20 lines of code. Is this a bug and how can it be worked around?

I’m experiencing the same issue. I’ve only created a small theme extension, and now I can’t add another one. Hoping for a solution soon!

Same situation, already just have one extension(simple, and folder size just only 40KB), when create secondary extension then the option that “Create Theme extension” is disable.

Hi, same here. I have an app with the “product rating” block extension which has 2 files and 10 lines of code only and I want to create another block extension but says “limit reached”. Any solution?

1 Like

I am still encountering the same issue. Has anyone found any solutions or fixes?

You can only have one extension, but you can have multiple .liquid files inside:

3 Likes

What if someone needs to use the two or three different targets (section, head, body).
How much lines of code can help to do that using one theme-app-extension?

Please reply if you can help.

1 Like

For anyone looking, this is the correct answer :+1:

1 Like

Hello @Sahood :slightly_smiling_face:

You can duplicate the liquid files with the same schema and uses but on each file select different targets. :slightly_smiling_face:
It’s will be like a trigger.liquid with a target section and a trigger_embed.liquid to the embed body for example.

To avoid duplicating code, use liquid includes - https://shopify.dev/docs/api/liquid/tags/include

For me, it’s worked like expected. :slightly_smiling_face: Hope that this could help you.

And now replaced by

{% render 'filename' %}

https://shopify.dev/docs/api/liquid/tags/render