0
votes

I do structure the project OpenUI5 MVC structure with node.js as following:

File structure

My App.js file:

App.js source

My index.html file:

index.html source

However, it always produces the following error:

Thrown error

[ERROR] XML Parsing Error: mismatched tag. Expected: </meta>.
        Location: http://localhost:1024/
        Line Number 6, Column 3:

[ERROR] Error: resource sap/ui/demo/walkthrough/view/App.view.xml could not be loaded from ./view/App.view.xml. Check for 'file not found' or parse errors. Reason: Not Found

If I try to move the "view" folder into the "public" folder ==> the project works well. I don't know what causes the issue above. Any assistance in clarifying this error is greatly appreciated.

1
Please could you copy and paste the error message here as text? - Xander
Error: resource sap/ui/demo/walkthrough/view/App.view.xml could not be loaded from ./view/App.view.xml. Check for 'file not found' or parse errors. Reason: Not Found - Truong Ngo

1 Answers

0
votes

As you set with app.use(express.static('public') the access path to the root path (/), all static file loads (to which the UI5 source files belongs to) are redirected to /public. W/o having the files in the /public folder you get a load failure.

If you wanna have a specific path which you can use in your app to the static file content, than you can define a mounting path, e.g. app.use('/static', express.static('public').