Skip to Content

UI5 Failed to load Component.js while using Component Container

Hi, I´m trying to use Component Container in a test app using as reference the blogs below, to show another app fragment. There has “APP1” with the UIComponent, and “APP2” that shows APP1 in Component Container.


In local tests (desktop) it works correctly, but after deploy the 2 apps in Gateway server, it shows error while loading APP1 component.js.

The component.js from test app (APP2) is read correctly from


But the test app(APP2) is trying to read the APP1 component.js file in the path


and shows error, because the component is not in this path, but in the same path above.

The test app view APP2 contains this code:


The manifest.js of test app APP2 contains this code

"sap.ui5": {
"componentUsages": {
"reuseAnotherComponent": {
"name": "Componente.PrazoPagto",
"lazy": false

The component app APP1 contains this code in manifest.js

"_version": "1.8.0",
"": {
"id": "Componente.PrazoPagto",
"type": "component",
"i18n": "i18n/",
"applicationVersion": {
"version": "1.0.0"

After the rror, I changed the view code in test app APP2 to:

manifestFirst= "true"

And write this code in init function, in component.js file from test app APP2:"Componente.PrazoPagto", "../zbsp_prazopagto");

But the error persists. The APP1 component.js file is read from


Any idea of how can I solve this? How to read the component.js from path

"<server>/sap/bc/ui5_ui5/sap/zbsp_prazopagto" ?


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 24, 2018 at 08:42 PM

    Hi Cristiano,

    we are importing our modules programmatically in our controllers, so I cannot check, if your manifest and view configuration is correct.

    But I am sure you have to call registerModulePath at the first line(!) of Component.js and not inside your init function, that's too late.

    Additionally, we register the full relative path "/sap/bc/ui5_ui5/sap/zbsp_prazopagto".

    I hope, it helps.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2018 at 07:49 AM

    Hi Cristiano,

    I think the problem is in the modulePath that you registered.
    Try with absolute path please (In my projects, it works in this way):"Componente.PrazoPagto", "/sap/bc/ui5_ui5/sap/zbsp_prazopagto");

    Kind regards,

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 24, 2018 at 09:34 PM

    Hi Späh, thanks for your answer. I will upload more info. This is the loading of component.js from parent app:

    This is the loading of component.js from child app :

    This is not the path of child app in SICF tcode. Need I to specify the full path in registerModulePath("Componente.PrazoPagto", "../zbsp_prazopagto")?

    post-01.png (64.4 kB)
    post-02.png (107.0 kB)
    Add comment
    10|10000 characters needed characters exceeded