-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceError: KeyboardEvent is not defined #7
Comments
It seems that this error only occurs when I use a hostlistener annotation ( This works:
This also works:
This doesn't work:
|
Removing |
hello , I met the same problem. |
I found a temporary solution to this problem. I put a text replacing plugin regexp-replace-loader to webpack config:
|
@graundas thanks this worked. however i only needed to add it to my server config, if i used it in my shared config it breaks visual studio debugging |
@graundas it works but I firstly had to run |
I fixed it by adding // Fix ReferenceError: KeyboardEvent is not defined
global['KeyboardEvent'] = null;
// Faster server renders w/ Prod mode (dev mode never needed)
enableProdMode();
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main'); |
I tried using this in combination with my Angular-Cli based project, but am having a problem with errors that happen once
ts-node src/server.ts
gets fired up.The error I get is:
The text was updated successfully, but these errors were encountered: