Making the code changes for Step 10 results in numerous errors. I have spent many hours trying everything I can to make it work. All 'case' occurrences seem to be correct and the code matches the reference material. The errors I get back seem to imply that it cannot load my component.js file. However the 'source' of that file seems to be https://openui5.hana.ondemand.com/resources/learnsap/Component.js which I do not understand. Does this imply that my local code is somehow uploaded to the openui5 server and then run thru on the back-end? If not, why would the 'prefix' of the url be that way?
My project is: learnsap/webapp/ (rather than sap.ui.demo.walkthru/webapp/). If I revert the code back to step 9, it works great. Here are the errors I get back:
Access to XMLHttpRequest at 'https://openui5.hana.ondemand.com/resources/learnsap/manifest.json?sap-language=EN' from origin 'http://localhost:8082' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. GET https://openui5.hana.ondemand.com/resources/learnsap/manifest.json?sap-language=EN net::ERR_FAILED 404 GET https://openui5.hana.ondemand.com/resources/learnsap/Component-preload.js net::ERR_ABORTED 404 (Not Found) GET https://openui5.hana.ondemand.com/resources/learnsap/Component-preload.js net::ERR_ABORTED 404 (Not Found) 2022-09-12 18:06:54.922899 failed to load JavaScript resource: learnsap/Component-preload.js - sap.ui.ModuleSystem GET https://openui5.hana.ondemand.com/resources/learnsap/Component.js net::ERR_ABORTED 404 (Not Found) GET https://openui5.hana.ondemand.com/resources/learnsap/Component.js net::ERR_ABORTED 404 (Not Found) 2022-09-12 18:06:55.662500 failed to load JavaScript resource: learnsap/Component.js - sap.ui.ModuleSystem 2022-09-12 18:06:55.663300 Failed to load component for container container - ModuleError: failed to load 'learnsap/Component.js' from https://openui5.hana.ondemand.com/resources/learnsap/Component.js: script load error ModuleError: failed to load 'learnsap/Component.js' from https://openui5.hana.ondemand.com/resources/learnsap/Component.js: script load error at se (https://openui5.hana.ondemand.com/resources/sap-ui-core.js:10:7148) at ne.failWith (https://openui5.hana.ondemand.com/resources/sap-ui-core.js:10:4989) at HTMLScriptElement.i (https://openui5.hana.ondemand.com/resources/sap-ui-core.js:10:10946) Caused by: Error: script load error at HTMLScriptElement.i (https://openui5.hana.ondemand.com/resources/sap-ui-core.js:10:10988)
My files are in the same places as your files. They are named the same. They have the same content. That said, here are the important bits of the three main files. First index.html:
<head>
<meta charset="utf-8">
<script
id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_belize"
data-sap-ui-libs="sap.m"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-resourceroots='{"learnsap.webapp": "./"}'>
</script>
<title>SAPUI5 WalkthroughX</title>
</head>
<body id="content" class="sapUiBody">
<div data-sap-ui-component data-name="learnsap" data-id="container" data-settings='{"id":"app"}'></div>
</body>
Then component.js:
function(UIComponent,JSONModel,ResourceModel) { "use strict"; return UIComponent.extend("learnsap.Component",{ metadata: { manifest : "json"
And manifest.json:
"sap.ui5": { "_version": "1.1.0", "rootView" : { "viewName" : "learnsap.view.App", "type" : "XML", "async" : true, "id" : "app" },
I am new to the SAP universe. I have done extensive JS coding with Vue.js, jQuery, Bootstrap, and 'plain'. I simply do not know how to fix this so that I can code the rest of the course (I have watched it fully).
Thank you in advance...