on 07-09-2023 12:14 AM
screenshot-2023-07-09-at-011212.png
screenshot-2023-07-09-at-011234.png
Dear Community Members,
I am trying to learn to build ui5 applications using typescript. While trying to execute the application, i ended up with the following error and require your help. In the Component.ts file, i have used ES6 class and when i build, I expected the build file to be something like "UIComponent.extend("ui5.typescript.Component", {".
But instead, i see the code still compiled to "class Component extends UIComponent {"
While executing the code i see the below error.
Log-dbg.js:493 2023-07-09 01:03:39.670899 Failed to load component for container container - TypeError: Class constructor Component cannot be invoked without 'new'
TypeError: Class constructor Component cannot be invoked without 'new'
Here is a reference to my github code.
https://github.com/arunkrishnamoorthy/piapproval/tree/main
Note: Here i generated the app from BAS wizard and modified the .ts file and added the required dependencies. I tried the same example in the VS Code using yo easy-ui5 and everything worked fine.
I have this problem solved. I added this namespace in the Component.ts file, then the Component.js was transpiled as expected.
/**
* @namespace testyo
*/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
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.