no exported member 'KeycloakConfig'.
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x] bug report -> please search for issues before submitting
- [ ] feature request
Versions.
keycloak-angular: 7.3.1 --> 8.0.1 angular: 10 (recently upgraded from 8.2, but had successful builds after upgrade to 10) keycloak: Believed to be N/A for current issue.
Repro steps.
- Write application code.
- Start on version 7.3.1 of keycloak angular
- Run
npm outdated
and note that Latest is 8.0.1 - Change package.json’s dependency from
"keycloak-angular": "7.3.1"
to"keycloak-angular": "8.0.1"
- Run
npm install
- Run
ng test
Sample code snippets
import { KeycloakConfig } from 'keycloak-angular';
@Injectable()
export class AppConfig {
static keycloak: KeycloakConfig;
}
export class KeycloakCallsService {
readonly baseApiUrl: string = `${AppConfig.keycloak.url}/admin/realms/${AppConfig.keycloak.realm}`;
export class MockAppConfig {
static keycloak: KeycloakConfig = {
url: 'testKeycloakUrl',
realm: 'testKeycloakRealm',
clientId: 'testKeycloakClientId'
};
}
The log given by the failure.
ERROR in src/app/application/app.config.spec.ts:1:10 - error TS2305: Module '"../../../node_modules/keycloak-angular/keycloak-angular"' has no exported member 'KeycloakConfig'.
1 import { KeycloakConfig } from 'keycloak-angular';
~~~~~~~~~~~~~~
src/app/application/app.config.ts:3:10 - error TS2305: Module '"../../../node_modules/keycloak-angular/keycloak-angular"' has no exported member 'KeycloakConfig'.
3 import { KeycloakConfig } from 'keycloak-angular';
~~~~~~~~~~~~~~
Desired functionality.
Keycloak-Angular 8.0.1 works with our application so that we can remain up-to-date with functionality and security. If there are release notes regarding the upgrade from 7 to 8, I haven’t been able to find them yet.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Namespace as no exported member 'ɵɵNgModuleDeclaration'
Hi!, I use Angular 11 and I would update keycloak-angular from version 8.2.0 to 9.0.0, but after installed new version and run application ......
Read more >Angular2 module has no exported member - Stack Overflow
module"' has no exported member 'SigninComponent'. even after exporting SigninComponent. The project folder structure is as shown below: enter ...
Read more >Module '"@prismicio/client"' has no exported member 'Content'
As title states, I'm getting this error: This is my prismic.ts: import * as prismic from '@prismicio/client'; import * as prismicNext from ...
Read more >keycloak-angular - npm
Easy Keycloak setup for Angular applications. Latest version: 13.0.0, last published: a month ago. Start using keycloak-angular in your ...
Read more >Connecting Keycloak to Angular - Medium
export class KeycloakService { ... keycloakAuth = new Keycloak(config); ... keycloak.service';export function kcFactory(keycloakService: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that the
KeycloakConfig
interface was defined within this package in7.3.1
but at least of8.0.1
, while an identically-named interface is still used, it is instead imported from the keylcoak-js adapter node module.To get tests to pass, I changed
to
However, other parts of the application that depend on Keycloak fail to work afterthis.
This is indeed a breaking change we introduced in version 8. These types have since been added to
keycloak-js
and should be imported there.