Closed HerrDerb closed 2 days ago
When using both current versions
"keycloak-angular": "16.1.0", "keycloak-js": "26.0.5",
building the project causes quite a few of those:
X [ERROR] TS2503: Cannot find namespace 'Keycloak'. [plugin angular-compiler] node_modules/keycloak-angular/lib/core/interfaces/keycloak-options.d.ts:12:22: 12 │ config?: string | Keycloak.KeycloakConfig;
Originally posted by @HerrDerb in https://github.com/mauriciovigolo/keycloak-angular/issues/583#issuecomment-2490961630
This is reproduceable by using "moduleResolution:" "node"
"moduleResolution:" "node"
It seems that angular-keycloak relies on the exported Keycloak namespace which is marked deprecated.
Keycloak
Instead of using the namespace Keycloak angular-keycloak library should use the export default Keycloak
See -> https://github.com/keycloak/keycloak/blob/main/js/libs/keycloak-js/lib/keycloak.d.ts#L655
I don't know if this is for sure connected to your problem, but it seems that using version 26 requires to use "moduleResolution": "Bundler" as mentioned in the official upgrading guide.
26
"moduleResolution": "Bundler"
Point made
When using both current versions
building the project causes quite a few of those:
Originally posted by @HerrDerb in https://github.com/mauriciovigolo/keycloak-angular/issues/583#issuecomment-2490961630
This is reproduceable by using
"moduleResolution:" "node"
It seems that angular-keycloak relies on the exported
Keycloak
namespace which is marked deprecated.Instead of using the namespace
Keycloak
angular-keycloak library should use the export defaultKeycloak
See -> https://github.com/keycloak/keycloak/blob/main/js/libs/keycloak-js/lib/keycloak.d.ts#L655