on 12-01-2017 1:19 PM
Hi,
I am trying to create a desktop application of SAPUI5 using Electronjs. I am facing an error while launching the application saying "Uncaught ReferenceError: jQuery is not defined at sap-ui-core.js:144" and "Uncaught TypeError: sap.ui.getCore is not a function at index.html:20".
Please let me know how I can resolve these errors.
Thanks,
Anmol
Hi,
Share your index.html code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find below code from index.html
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>Shop Administration Tool</title>
<script
id="sap-ui-bootstrap"
src="https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_belize"
data-sap-ui-libs="sap.m, sap.tnt"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"sap.ui.demo.toolpageapp": "./"}'
data-sap-ui-preload="async">
</script>
<script>
sap.ui.getCore().attachInit(function() {
sap.ui.require([
"sap/ui/core/ComponentContainer"
], function() {
new sap.ui.core.ComponentContainer({
name: "sap.ui.demo.toolpageapp"
}).placeAt("content");
});
});
</script>
</head>
<body id="content">
</body>
</html>
When I am running my project using ELECTRONJS to create a desktop app then it is giving me this error else it is working fine. Please let me know how I can resolve this.
Hi Anmol Agarwal,
The error might be caused because your libraries are not getting rendered when your application is running in the browser. This happens when the SAPUI5 bootstrapping doesnot happen correctly. Could you check you index.html file for the scripts, especially where the bootstrapping takes place.Maybe you might have missed something there.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please find below code from index.html
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>Shop Administration Tool</title>
<script
id="sap-ui-bootstrap"
src="https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_belize"
data-sap-ui-libs="sap.m, sap.tnt"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"sap.ui.demo.toolpageapp": "./"}'
data-sap-ui-preload="async">
</script>
<script>
sap.ui.getCore().attachInit(function() {
sap.ui.require([
"sap/ui/core/ComponentContainer"
], function() {
new sap.ui.core.ComponentContainer({
name: "sap.ui.demo.toolpageapp"
}).placeAt("content");
});
});
</script>
</head>
<body id="content">
</body>
</html>
When I am running my project using ELECTRONJS to create a desktop app then it is giving me this error else it is working fine. Please let me know how I can resolve this.
Hi Anmol Agarwal,
I am not sure how it works with electronjs, with browser and UI perspective your code is fully correct and should be working in the browser perfectly. I think you have to configure the external libraries in the module before using them in elctronjs.
Regards.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.