Closed tahirjadoon closed 3 years ago
Try excluding the @ng-idle code when on the server. See following link https://github.com/angular/universal/issues/860#issuecomment-349619247
Had this problem when i include NgIdleKeepaliveModule in app.module. Any solution?
dist...\server\main.js:1035 super(document.documentElement, events, options); ^ ReferenceError: document is not defined
My project is Angular 6.
I am trying to use Angular Universal:
https://github.com/angular/angular-cli/wiki/stories-universal-rendering
I have done all the setup. At the end when i run node dist/server.js, i get into following issue.
The issue here is @ng-idle/core which is being used inside my auth service.
As part of the angular universal setup, i have provided externals (which is missing from the code on the github for angular universal).
So here is my current webpack.server.config.js file
and the app.module
and the auth service has the following two imports.
How can i fix this issue?