openui5
openui5 copied to clipboard
Wrong tooling configuration and missing dependencies in UI5 Walkthrough tutorial samples
Hello,
This issue was taken from: https://github.com/SAP/ui5-tooling/issues/530
The dependencies and ui5-tooling configuration in the downloaded samples from the UI5 Walkthrough tutorial are not correct: https://sapui5.hana.ondemand.com/#/entity/sap.m.tutorial.walkthrough/sample/sap.m.tutorial.walkthrough.08 https://sapui5.hana.ondemand.com/#/entity/sap.m.tutorial.walkthrough/sample/sap.m.tutorial.walkthrough.10 Please also check the other steps, it is the same issue for all available steps.
Steps to reproduce:
- Download one of the examples (e.g. step 8 or 10) and extract it.
- Navigate into the folder and run
npm install
to install the dependencies. - Run
npm start
to runui5 serve
.
The following error occurs:
Could not find required manifest.json for project sap.m.tutorial.walkthrough.08: ENOENT: no such file or directory, open '/someAbsolutePath/sap.m.tutorial.walkthrough.08/manifest.json'
If you fix the path in the ui5.yaml
and a manifest.json
file is available the dependencies to sap.ui.core
and sap.m
are still missing. You can check this in the browser when loading the served app.
Proposal to fix the issue:
- The ui5-tooling requires a
manifest.json
file which is only introduced since step 10 of the walkthrough. A possible fix would be adding a manifest.json with the minimum requirements as a dummy in the webapp folder:
{
"sap.app": {
"id":"sap.ui.demo.walkthrough",
"type":"application"
}
}
- The path to the webapp is wrong and needs to be changed in the
ui5.yaml
:
webapp:"./webapp/"
This webapp path is the default one which means you can also remove the resources: configuration: paths: ...
part.
- The dependencies in the
package.json
aren't complete. Thesap.m
andsap.ui.core
dependencies are missing. It should look something like this:
"dependencies":{
"@openui5/sap.m":"^1",
"@openui5/sap.ui.core":"^1",
"@openui5/themelib_sap_fiori_3":"^1"
},
(Thanks @RandomByte) Please note that we also don't recommend declaring OpenUI5 dependencies in package.json anymore. See https://sap.github.io/ui5-tooling/pages/OpenUI5/
Thanks and best regards Sven
The dependencies in the
package.json
aren't complete. Thesap.m
andsap.ui.core
dependencies are missing.
Note that we also don't recommend declaring OpenUI5 dependencies in package.json
anymore. See https://sap.github.io/ui5-tooling/pages/OpenUI5/
Hello @svbender,
Thank you for sharing this finding. I've created an internal incident 2180268147. The status of the issue will be updated here in GitHub.
Regards, Nikolay
This issue will be covered in backlog item BGSOFUIPIRIN-5329.
Thanks for sharing all of this, I was stuck with getting a sapui5 minimal app running. I followed along here and you helped me a lot. So if anybody else is stuck, maybe the commit https://github.com/informatom/sapui5-demo/commit/8c72bb43978ba86d2700a0004245f47498a7386c in my repo can help you get running in SAP Business Application Studio.
npm install
and ui5 serve
should be enough to get you up and running after cloning that particular commit.
Fixed with ad6a5b7536355a5bfadcdb4caed470b9c0570a76 and available with UI5 1.119.0
The fix took more than 2 years, I face the same issue in 2023. I installed ui5
today, and still face that
@bora89 Tutorial setup is working fine now.
I guess you're talking about the ui5 init
command, requiring a manifest.json
. If so, https://github.com/SAP/ui5-tooling/issues/306 should be the place for further updates.