Keycloak-angular: Error: KeycloakAngularModule is not an NgModule

Created on 22 Nov 2017  路  4Comments  路  Source: mauriciovigolo/keycloak-angular

Hi,

First of all tx for publising this lib! Very useful.
I get following error while compiling my app.
As a workaround I copied the keycloak module declarations and providers to my app module.
That seems to work fine.
I inspected your code, the keycloak module has the @NgModule decorator. So I guess something went wrong with the publishing of the lib?

ERROR in Error: KeycloakAngularModule is not an NgModule
    at _getNgModuleMetadata (C:\Users\Jasper\git\fmsb-ccare\node_modules\@angular\compiler-cli\src\ngtools_impl.js:140:15)
    at _extractLazyRoutesFromStaticModule (C:\Users\Jasper\git\fmsb-ccare\node_modules\@angular\compiler-cli\src\ngtools_impl.js:109:26)
    at C:\Users\Jasper\git\fmsb-ccare\node_modules\@angular\compiler-cli\src\ngtools_impl.js:129:27
    at Array.reduce (native)
    at _extractLazyRoutesFromStaticModule (C:\Users\Jasper\git\fmsb-ccare\node_modules\@angular\compiler-cli\src\ngtools_impl.js:128:10)
    at Object.listLazyRoutesOfModule (C:\Users\Jasper\git\fmsb-ccare\node_modules\@angular\compiler-cli\src\ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\Jasper\git\fmsb-ccare\node_modules\@angular\compiler-cli\src\ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (C:\Users\Jasper\git\fmsb-ccare\node_modules\@ngtools\webpack\src\plugin.js:207:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (C:\Users\Jasper\git\fmsb-ccare\node_modules\@ngtools\webpack\src\plugin.js:443:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)
webpack: Failed to compile.
Bug

All 4 comments

Hi @unib1t,

Could you tell me the angular and keycloak-angular versions you are using in your project? I will take a closer look on it.

Probably today or tomorrow i will add an example to this project to make the setup up easier.

Thanks!

keycloak-angular: 1.1.0
angular: 4.4.4

@unib1t,

You are right! There is an issue in the build process. Didn't catch it because in the latest angular versions (> v.5) the issue is not happening.

I will fix it and release a new version.

Thanks for submitting the issue!

Problem fixed in v. 1.1.1.

Closing the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Codinger386 picture Codinger386  路  4Comments

jderuere picture jderuere  路  4Comments

livthomas picture livthomas  路  4Comments

4javier picture 4javier  路  3Comments

samherrmann picture samherrmann  路  3Comments