ERROR TypeError: keycloak_js__WEBPACK_IMPORTED_MODULE_3__ is not a function

934 views
Skip to first unread message

rahul ravindran

unread,
Oct 28, 2022, 7:45:44 AM10/28/22
to Keycloak User
Hi,
Can any body help with this error.Currently i am using Microfrontend angular module federation.I am installed keycloak node module in the project
    "keycloak-angular": "^12.1.0",
    "keycloak-js": "^19.0.3",

But when i run it i get the following error:
ERROR TypeError: keycloak_js__WEBPACK_IMPORTED_MODULE_3__ is not a function
    at keycloak-angular.mjs:114:26
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:25:1)
    at asyncToGenerator.js:32:1
    at new ZoneAwarePromise (zone.js:1429:21)
    at asyncToGenerator.js:21:1
    at KeycloakService.init (keycloak-angular.mjs:120:30)
    at Array.<anonymous> (keycloak-initializer.ts:18:27)
    at ApplicationInitStatus.runInitializers (core.mjs:25353:36)


.I was able to run keycloak with monolithic angular application But failed to run this in MFE with angular module federation

anybody has any idea how to resolve this? 


Sada Shiv Dash

unread,
Oct 28, 2022, 8:02:40 AM10/28/22
to rahul ravindran, Keycloak User
Hello Rahul,

Can you please downstream to 18 version of keycloak. To me it seems that latest version have some problem. 


Regards
Sada Shiv Dash

On 28-Oct-2022, at 5:15 PM, rahul ravindran <kr.2...@gmail.com> wrote:

Hi,
--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/24419887-d6e6-4693-bc83-5fa8deefec77n%40googlegroups.com.

rahul ravindran

unread,
Oct 28, 2022, 8:58:59 AM10/28/22
to Sada Shiv Dash, Keycloak User
Hi Sada Shiv Dash,
Thanks for the response.

I tried downstream to 18 version of keycloak But it gave me the same error.Here is package.json information
    "keycloak-angular": "^12.1.0",
    "keycloak-js": "^18.0.0",


Regards,
Rahul Ravindran

rahul ravindran

unread,
Oct 31, 2022, 2:43:04 AM10/31/22
to Keycloak User
Hi,
I was able to pick the correct version(16.1.1) which support MFE angular version.The version 19,18 and 17 doesn't work with webpack 5.Need to fix the issue with latest version of keycloak-js.So where I need to highlight this issue so that this issue can be addressed and fixed?

Regards,
Rahul Ravindran
Reply all
Reply to author
Forward
0 new messages