Closed gitalvininfo closed 4 years ago
Hi @gitalvininfo, Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app
and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
Hi Already solved it. I just install domino in npm and that solved my problem. For future developers who may encounter this try this solution.
Import it at server.ts and try to put it below zone.js import.
const domino = require('domino');
const fs = require('fs');
const path = require('path');
const template = fs.readFileSync(path.join('.', 'dist/gradus/browser', 'index.html')).toString();
Object.assign(global, domino.impl);
(global as any)['KeyboardEvent'] = domino.impl.Event;
const win = domino.createWindow(template);
global['window'] = win;
global['document'] = win.document;
We have the same kind of issue with Document.
@alan-agius4 : Is the solution proposed by @gitalvininfo the only solution to this issue ?
https://github.com/manfredsteyer/angular-oauth2-oidc/issues/773
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π bug report
Affected Package
The issue is caused by package @angular/.... Not Exactly sure what package is causing the error/issue ### Is this a regression? Yes, the previous version in which this bug was not present was: .... First time facing this issue since this is my first time upgrading to Angular Universal ### Description A clear and concise description of the problem... So basically I run the command `ng add @nguniversal/express-engine` to install angular universal and everything works fine. I run the command `npm run build:ssr` and also everything works fine, the dist folder is created, however, when I try to run the command `npm run serve:ssr`, I am having an error which says **Reference Error: Element is not defined**. I don't know what causes the error since it just says **Reference Error: Element is not defined** everytime I try to run the command `npm run serve:ssr` ## π¬ Minimal ReproductionCannot upload the code. Big App.
π₯ Exception or Error
π Your Environment
Angular Version:
Please tell me if I miss something. Thank you.