VilleLipponen
VilleLipponen

Reputation: 656

How can I run a specific SAPUI5 control sample from Demo Kit locally?

I am looking up the sample for the sap.m.UploadCollection control. I've downloaded and run the sample package locally using the following commands:

npm install

and then

ui5 serve -o index.html

I get the following error in console when navigating to http://localhost:8080/index.html:

2022-08-15 16:56:35.802600 Failed to load component for container container - ModuleError: Failed to resolve dependencies of 'sap/m/sample/UploadCollection/Page.controller.js'
-> 'sap/m/MessageToast.js': failed to load 'sap/m/MessageToast.js' from ./resources/sap/m/MessageToast.js: script load error
ModuleError: Failed to resolve dependencies of 'sap/m/sample/UploadCollection/Page.controller.js'

If I move the Page.contoller.js to a newly created controller folder and move the Page.view.xml to the newly created view folder, then a different error occurs.

How can the downloaded sample project run locally?

Upvotes: 3

Views: 898

Answers (1)

Boghyon Hoffmann
Boghyon Hoffmann

Reputation: 18064

Update: most samples have now received fixes so that they can be started locally with npm install && ui5 serve. The issue mentioned in the question is no longer reproducible.


If a sample still cannot be started locally, ensure that the project is UI5 Tooling enabled. Follow "Enabling an Existing Project".

Upvotes: 0

Related Questions