on 10-19-2020 8:21 PM
Hi! I am following this blog to setup local develpment environment.
The root location is workng fine for the webapp folder, but not for resources folder . What I am doing wrong? I am doing the same steps from blog above. See the attached screenshots.
Regards.
Nginx configuration
localhost root destination
destination for resources not ok
Hello Cristiano, you can't forget that you are also using Nginx, you could check its log too to diagnose and try to trace the issue.
This case the error is pointed there, you should be having some "[error] 21#21: *1 open() "C:\Users\...\sapui5\resources\resources\sap-ui-core.js" failed (2: No such file or directory)" lines popping on log (also something similar to sandbox.js file). This is because root directive receives a base path and concatenates all path on URL to build local file path, this. .Nginx is trying to read file in paths
c:\Users\...\sapui5\resources\resources\sap-ui-core.js
c:\Users\...\sapui5\resources\test-resources\sap\ushell\bootstrap\sandbox.js
when the correct path are:
c:\Users\...\sapui5\resources\sap-ui-core.js
c:\Users\...\sapui5\test-resources\sap\ushell\bootstrap\sandbox.js
This is a bit misleading behavior in Nginx if you never stopped to read root directive on Nginx documentation.
Your Javascript snippet have incorrect paths, you should strip out the first "resources" directory. This will fix it loading sap-ui-core.js file (your network print state this), but that blog is about UI5 only and you are also using UShell (Fiori), which resides on "test-resources" folder, so you also need to add "/test-resources/" location to your configuration. root directive will be the same from "/resources/" location, because the root (base) path is the same:
location /test-resources/ {
root C:\Users\crist\git-root\sapui5;
autoindex on;
}
And your javascript resources paths (from that snippet) will be:
"test-resources/sap/ushell/bootstrap/sandbox.js"
"resources/sap-ui-core.js"
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cristiano, Looks like you need to put your UI5 lib files in appInventario folder or move your webapp folder to git-root and adjust the location parmeters accordingly. Regards Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.