Forge: error document exceeds 10 resources valid-resource-required

Hello everyone,

I’m in the process of migrating an app from UI Kit (v1) to Custom UI, and I’m encountering the following error when attempting to deploy:

error    document exceeds 10 resources  valid-resource-required

This issue persists even when I run:

forge deploy --no-verify

Does anyone know if it’s possible to increase this limit or if there’s a workaround for this?

Thanks in advance!

Best,
Rui Rodrigues

Hi @rmrodrigues , 10 resources is the platform limit. How many resources are you attempting to deploy? Are you able to combine some of these resources together into one?

1 Like

Hi @QuocLieu ,
Thank you for your answer.

I have 6 macros, and for each macro, I have 2 resources:

  • View screeen
  • Config screen

I’m using custom UI.
I’m trying to deploy 14 resources because we have other screens.

Are you able to combine some of these resources together into one?

How can I do it?

Thanks.

Cheers,
Rui Rodrigues.

Hi @rmrodrigues , the latest version of UI Kit can be used as a macro configuration for a Custom UI macro and that can be combined into one resource https://developer.atlassian.com/platform/forge/add-configuration-to-a-macro-with-ui-kit/#create-the-configuration-1

If you’re using the custom macro configuration, then unfortunately the 10 resource limit still applies. You could potentially use the same resource but conditionally render a different screen depending on what’s being passed from the view resource.

1 Like

Hi @rmrodrigues
You can merge all your Custom UI resources into a single project.
Simply retrieve the context using view.getContext() in your index.tsx file. Then, based on the current moduleKey, either render the appropriate component or handle navigation if you’re using a router.
Here an example that could be useful https://github.com/andrei-pisklenov/forge-starter/blob/master/packages/ui/src/app/App.tsx

1 Like

Hi, there is now an open ticket that you can vote to increase the resource limit on Forge https://jira.atlassian.com/browse/ECO-916