question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NodeInvocationException: Prerendering failed: ReferenceError: Event is not defined

See original GitHub issue

Added the statement below in package.json after installing “@swimlane/ngx-datatable”: “^11.0.4”,

In my app.module.ts: import { NgxDatatableModule } from ‘@swimlane/ngx-datatable’; This itself doesn’t throw any error.

imports: [ CommonModule, HttpModule, FormsModule, Ng2BootstrapModule.forRoot(), TransferHttpModule, NgxDatatableModule, BrowserModule ]

With the import, the below error happen. Please advise me.

I’m submitting a … (check one with “x”)

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior NodeInvocationException: Prerendering failed because of error: ReferenceError: Event is not defined at C:\Project\AnglarUniversal4\ClientApp\dist\main-server.js:168292:42

Expected behavior My main page should run as per normal

Reproduction of the problem Download the template from: https://github.com/MarkPieszak/aspnetcore-angular2-universal

  1. npm install @swimlane/ngx-datatable
  2. add “@swimlane/ngx-datatable”: “^11.0.4” to packaga.json
  3. In app.module.ts, add the statement: import { NgxDatatableModule } from ‘@swimlane/ngx-datatable’;
  4. In app.module.ts, import NgxDatatableModule The issue should happen again

What is the motivation / use case for changing the behavior? to user ngx-datatable in my solution

Please tell us about your environment: just using Window 10 and Visual Studio 2017

  • Table version: 0.8.x I should be using the latest version

  • Angular version: 2.0.x I should be using the latest version

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Chrome: 61.0.3163.100

  • Language: [all | TypeScript X.X | ES6/7 | ES5] TypeScript 2.3 | ES5

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
amcdnlcommented, Nov 24, 2017

I haven’t done any testing w/ Universal. Its on the list tho. I’ll poke around and see if I find anything obvious.

0reactions
helloneobergcommented, Dec 5, 2017

Sure thanks amcdnl. Please update if it is working with Angular Universal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prerendering failed because of error: ReferenceError: ...
NodeInvocationException : Prerendering failed because of error: ReferenceError: window is not defined ... So what do I need to do to resolve this?...
Read more >
Prerendering failed: ReferenceError: Event is not defined
NodeInvocationException : Prerendering failed: ReferenceError: Event is not defined.
Read more >
How to Fix ReferenceError: Event is Not Defined in ...
JavaScript's ReferenceError: Event is Not Defined occurs if the event parameter is not declared correctly when using an event handler.
Read more >
ASP.NET CORE 2 + ANGULAR 4 ...
NET CORE 2 + ANGULAR 4: NodeInvocationException: Prerendering failed because of error: ReferenceError: window is not defined #19667.
Read more >
How to solve the document is not defined error
Here's how to fix the “referenceerror: document is not defined” error that you ... document is an object that's made available by the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found