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.

TouchEvent is not defined error on module import

See original GitHub issue

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

Current behavior When importing NgxGraphModule I get a ReferenceError in Firefox. There was no error when using ngx-graph 5.0.1.

Reproduction of the problem

import { NgxGraphModule } from '@swimlane/ngx-graph';

@NgModule({
  imports: [
    ...
    NgxGraphModule,
  ],
})
export class MyModule {}

image

Please tell us about your environment:

  • ngx-graph version: 5.1.0
  • Angular version: 6.0.6
  • Browser: [ Firefox 60 ]
  • Language: [ TypeScript 2.7.2 ]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
isaacplmanncommented, Oct 5, 2018

This issue is fixed in version 5.1.1

1reaction
aniruddhadas9commented, Aug 17, 2018

I am also getting the same issue. Any one have a workaround so solved this

Read more comments on GitHub >

github_iconTop Results From Across the Web

TouchEvent not working in firefox and other website browser
To get this work in FF, just add window.TouchEvent condition (is it defined):. if(window.TouchEvent && e.originalEvent instanceof TouchEvent){}.
Read more >
angular/angular-cli - Gitter
Then ng test would say error: Can not load ... the error in firefox and safari 'ReferenceError: TouchEvent is not defined' ... did...
Read more >
SPFx. Error while importing modernizr in SPFx
It seems like modernizr script from the CDN does not contain any modules. Try to use SPComponentLoader. import { SPComponentLoader } from ...
Read more >
vue2-touch-events - npm
import Vue from 'vue' import Vue2TouchEvents from 'vue2-touch-events' ... Use touch event only, will not trigger click event.
Read more >
Find replacement for Modernizr touchevent test and deprecate
I propose building on the existing logic in core/misc/modernizr-additional-tests.es6.js . This is in core because Modernizr itself has ...
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