Everything was running smoothly in Angular16. I had
"@types/openui5" : "1.40.4"
listed in my dev-dependencies. Here is how it's configured in the tsconfig.json
:
{
"compilerOptions": {
"downlevelIteration": true,
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "ES2022",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
],
"outDir": "../out-tsc/app",
"module": "ES2022",
"baseUrl": "",
"types": [
"openui5"
],
.
.
}
}
However, I encountered the following error:
Error: error TS2688: Cannot find type definition file for 'openui5'.
The file is in the program because:
Entry point of type library 'openui5' specified in compilerOptions
This led to many errors like doesn't exist
, such as:
error TS2339: Property 'getCore' does not exist on type 'typeof ui'.
55 sap.ui.getCore().getConfiguration().setLanguage(this.getSapLanguage());
~~~~~~~
and no exported
errors like:
error TS2694: Namespace 'sap.ui' has no exported member 'base'.
1246 static getMetadata(): sap.ui.base.Metadata;
~~~~
Upon upgrading to Angular17, which requires Typescript 5.2 or higher, these errors started appearing. In Angular16, Typescript 4.9 was being used.
Any idea what might be causing this issue?