Skip to Content
Oct 30, 2020 at 07:31 AM

How to import a non-SAPUI5-library into SAPUI5-App


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:-
jQuery.myUniqueNamespace = {
registerExternalLib: function (oShim) {
if (sap.ui.loader && sap.ui.loader.config) {
// official API since 1.56
shim: oShim
} else {
// internal API before 1.56;
"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.