question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`sap.fe.core.AppComponent` borked in 1.102.1?

See original GitHub issue

I’m currently updating an application from 1.96.7 to 1.102.1. We had the following code in our Component.ts:

import AppComponent from 'sap/fe/core/AppComponent';

export default class Component extends AppComponent {
  ...
}

This now fails with Module '"sap/fe/core/AppComponent"' has no default export. Looking into sap.fe.core.d.ts, sure enough, the module now looks like this:

declare module "sap/fe/core/AppComponent" {
  import { $UIComponentSettings } from "sap/ui/core/UIComponent";

  export interface $AppComponentSettings extends $UIComponentSettings {}
}

and AppComponent itself is declared a bit further down like this:

declare namespace sap
  namespace fe {
    namespace core {
      ...
      class AppComponent /* was: sap.ui.core.UIComponent */ extends Object {
        constructor();
      }
    }
  }
}

So of course, import AppComponent = sap.fe.core.AppComponent works, but then I get e.g. Property 'init' does not exist on type 'AppComponent'. Am I missing something here? 🙂

I’m using @sapui5/ts-types-esm@1.102.1.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nlunetscommented, Jun 16, 2022

HI @jakubledl this is indeed borked since a few version when we completely switched those class to TS internally (talk about ironic).

Anyway, i’ve produced a fix now which should be included in the next release of the ui5 types. Do you need it specifically for 1.102 ? in which case i’d downport the fix there too.

0reactions
akudevcommented, Jul 25, 2022

Alright: the complete lack of this class (and maybe others in sap.fe) was only in 1.103 and 1.104.0. It is fixed from 1.104.1 and a known issue in 1.105 is also going to be fixed, so essentially this is working fine in the latest release and is going to remain fine in subsequent ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Business Application Studio - Failed to load UI5 component ...
I generated an adaptation project for "fin.gl.documentdisplay" standard application on Business Application Studio and when I try to open SAPUI5 ...
Read more >
Documentation - Demo Kit - SAPUI5 SDK
ClientTreeBinding#getCount[FIX] sap/ui/core/format/DateFormat: wide and ... as Tile' option not working correctly[FIX] We now ensure that the sort order ...
Read more >
Freestyle apps powered by SAP Fiori elements
sap.ui.define([ "sap/fe/core/AppComponent", // instead of using sap/ui/core/UIComponent ] ... The property headerVisible="false" is not working as expected.
Read more >
This class of the AppComponent is deprecated, please use ...
Did anyone of you come across this error: "This class of the AppComponent is deprecated, please use "sap.fe.core.AppComponent" instead".
Read more >
SAP Tutorial: Complete CAP Java Part 3 | Nerd For Tech
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" ... where to find the app component — it'll be in the folder /browse/webapp.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found