on 02-07-2024 2:24 PM
Hello everyone! I am developing a Fiori app using Javascript and I integrated it with Node.js. Then, I installed the SPPull library (the library I need) with npm and I have it in the node_modules folder, this is the structure of the library:
Source code of library: GitHub - koltyakov/sppull: 📎 Download files from SharePoint document libraries using Node.js withou...
My problem is that I don’t know how to import this library (SPPull) into my view controller (In sap.ui.define). What path should I use? What steps should I follow? Regards.
Hello,
you can add any JavaScript library in the manifest.js file:
"dependencies": {
"libs": {
"sap.m": {
"lazy": false
},
"sap.me": {
"lazy": false
},
"sap.ui.comp": {
"lazy": false
},
"<External Library>": {
"lazy": false
}
},
"components": {
"<External Library>": {
"lazy": false
}
}
},
Don't forget that you move the downloaded external library to the resources folder
You need to register that new component in (registerModulePath) like described here:
Best,
Edrilan Berisha
SAP S/4HANA Cloud Financials Development
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Edrilan,
I am working in a cap application and I want to use with a pdf generator library in my js controller and if I understood your comment correctly, I should move the library to the resources folder ( which is not present in my cap project tree ), and then reference it in the manifest.json that I have under the /app/appname/webapp folder. I can't really find any resources about this concerning CAPm and I would really appreciate your help
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.