Error while using node module in SAP UI5 app - sapui5

The requirement is to use of the node modules in my controller file of a UI5 app. I've installed the module and it resides in my npm_module folder. Based on the below blog, I've added some configurations in my ui5.yaml, yet I get the error pasted below.
Can anyone help me in this regard?
Blog Referred: https://blogs.sap.com/2020/07/30/project-shims-using-npm-modules-with-ui5/
Code screenshot
Error: failed to load 'thirdparty/aws-sdk.js' from resources/thirdparty/aws-sdk.js: script load error

Update: The issue was the path mentioned in the controller. I changed it to refer to the dist folder where the actual aws-sdk.js existed. And it resolved the error.

Related

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?
Make sure that the downloaded project has the UI5 Tooling part is correctly configured according to the documentation https://sap.github.io/ui5-tooling/pages/Configuration
In your case, the control sap.m.UploadCollection is deprecated since UI5 1.88. So download one of the sap.m.upload.UploadSet samples instead. When downloaded, see which settings are missing in the ui5.yaml config file. E.g. run the below UI5 Tooling commands to add the missing settings:
ui5 use openui5#latest
ui5 add sap.ui.core sap.m sap.ui.layout sap.ui.unified themelib_sap_fiori_3 themelib_sap_horizon
This will at least allow the application to start.

Component.js not found - when run from XSA launchpad

I have issue with link sapui5 app to the launchpad. I was able to add tile and display it, but when I try to run it, error is logged to the console:
Error: failed to load '.../Component.js' from .../Component.js: 404 - Not Found
I think that I tried every combination of path (cf.url) and component name placed in "..."
I try to follow tutorial/guide from sap:
https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/8a583342d1c64822837fe49efbafdb53.html
but its quite vague and don't provide any answer.
I use namespace ZApp.sapui where sapui is name of the app.
I believe its only configuration error but I can be wrong.

Component-preload.js not found though it exists

I am getting component-preload.js not found error even tough it exists..
I'm using SAP WEBIDE personal edition full stack. so, neo-app.js and package.json are generated by defalut and by using the build option I generated component.-preload.js along with dist folder.As in my project I dont have direct connection to the SAP system,I need to use export(from webide) and import/download(using UI5/UI5/REPOSITORY_LOAD) into my front end server.Once I upload the project into the front end server component-preload.js is missing so am getting the same error "Component-preload.js missing" even though it exists.
could some one please let me know what could be the problem and how to resolve it.
Thanks in advance!

The absolute uri cannot be resolved : Custom Tag Issue

I am facing one problem when my code goes to publish. I have page in which i used a component with custom tag. It work fine in author, but when i replicate my code from author to publish it gives error like : The absolute uri: http:||www.mysite.com/taglibs cannot be resolved in either web.xml or the jar files deployed with this application . I have correctly replicated the my /apps/mysite folder on publish. But it gives error on publish but not on author.Any troubleshooting steps that can help me?
Thanks
Make sure that bundle with your custom tag library was installed correctly on publish enviroment (via /system/console/bundles).
And, could you describe how you deploy your project on publish enviroment?

TFSBranchToolVsExtension Exection of Action ConnectSourceControl Fails

I downloaded the TFSBranchTool VS Extension Project.
Rebuilt and Installed, but when I try to apply Initial Structure I get the following Error:
Exection Error:
Exection of Action 'ConnectSourceControl' Failed. Details: Could not load file or assembly Microsoft.AlLMRangers.BranchTool.SourceControlWrapper......
Any idea what might be causing the problem ? I tried on 2 different Servers! , I got the latest Update of VS2012.
I got VS2012 SDK installed and Vs2012 ObjectModel too, not sure what I'm missing!
We have posted an update to the sample code on http://vsarguidance.codeplex.com/releases/view/96222, which addresses this bug.
The issue was that Microsoft.ALMRangers.BranchTool.SourceControlWrapper.dll was missed in VSIX package. As action execution engine using MEF to load actions, it has no direct references to actions implementation assembly.
Vladimir from the team fixed the issue by specifying assembly as the MEF asset in the VS extension’s manifest file. Now it’s redistributed inside the extension package.
Can you verify that you have the file Microsoft.ALMRangers.BranchTool.SourceControlWrapper.dll
in the following folder:
%LOCALAPPDATA%\Microsoft\VisualStudio\11.0\Extensions\Microsoft. ALM Rangers\TfsBranchToolVSExtension\1.0
If its not there - try deleting the TfsBranchToolVSExtension and re-install the VSIX.