on 10-30-2020 7:31 AM
Hi All,
I am trying to import external non-sap libraries into a SAP UI-5 Application, I have followed the above instructions and I was able to import moment library. I want to import keytar and nedb packages into the SAP UI-5 Application, but I am unable to import. Attached are the links for the packages and the sample code I am trying to import. Keytar:- https://www.npmjs.com/package/keytar
Nedb:- https://www.npmjs.com/package/nedb
jQuery.myUniqueNamespace = {
registerExternalLib: function (oShim) {
if (sap.ui.loader && sap.ui.loader.config) {
// official API since 1.56
sap.ui.loader.config({
shim: oShim
});
} else {
// internal API before 1.56
jQuery.sap.registerModuleShims(oShim);
}
}
};
jQuery.myUniqueNamespace.registerExternalLib({
"nxpcm/sample/ExtLibWithinFLP/libs/keytar": {
"amd": true,
"export": "keytar"
}
});
It is giving me ' require is not defined' error. Even I tried to import the require library as well following the above instructions, still I am unable to import keytar and nedb packages. Please help on this.
Hi vav4001,
thanks for posting this question. Did you already tried https://blogs.sap.com/2017/04/30/how-to-include-third-party-libraries-modules-in-sapui5/?
Its a very well described blog post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.