cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SAPUI5 library reference in Web IDE template projects

saurabh_vakil
Active Contributor
0 Kudos

Hi Experts,

I am using the HCP based Web IDE using my trial account to create a project using the Fiori Worklist template, which connects to the ES4 demo gateway system to fetch and display data.

When I run the project from Web IDE by selecting Run -> App a new tab opens with a blank page with no output. When I check the browser console I see the below error message:

However, when I replace the reference to the sap-ui-core.js in index.html bootstrap script tag from src="resources/sap-ui-core.js" to src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" can see the output just fine.

Does anyone know why is Web IDE not able to resolve the relative path to the SAPUI5 core?

Regards,

Saurabh

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Instead of src="resources/sap-ui-core.js", have you tried src="../../resources/sap-ui-core.js"?

Sometimes that works for me.

saurabh_vakil
Active Contributor
0 Kudos

Using src="../../resources/sap-ui-core.js" also does not make a difference, I still see the same error in the console and the blank output page.

0 Kudos

Sorry:) ..Please find below link.

saurabh_vakil
Active Contributor
0 Kudos

Thanks for the link Pranav, but I already have the route defined for the UI5 resource in the neo-app.json file in the project as indicated in the link you provided.


     "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "version": "snapshot",

        "entryPath": "/resources"

      }

younghwan_kim
Active Participant
0 Kudos

Try again with slash at first.

src="/resources/sap-ui-core.js"

saurabh_vakil
Active Contributor
0 Kudos

Even with the leading forward slash I see the same error message in the browser console and an empty page.

src="/resources/sap-ui-core.js"

0 Kudos

Hi,

The below link might help you.

Regards

Pranav

saurabh_vakil
Active Contributor
0 Kudos

Buddy, the link you posted points to this very thread...

pfefferf
Active Contributor
0 Kudos

Hello Saurabh,

do you have the route information for the UI5 resource in your projects neo-app.json file?


  "routes": [

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      }

    }

  ]

Regards,

Florian

saurabh_vakil
Active Contributor
0 Kudos

Hi Florian,

Thanks for your response!

Yes, I do have the below route for the UI5 resource in the neo-app.json file of my project.


      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "version": "snapshot",

        "entryPath": "/resources"

      }

Regards,

Saurabh