ngx-graph: TouchEvent is not defined error on module import

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 ]

About this issue

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

Most upvoted comments

This issue is fixed in version 5.1.1

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

The same error on Firefox and Safari, but OK with Chrome.

  • ngx-graph version: 5.1.0
  • Angular version: 6.0.0
  • Browser: [ Firefox, Safari ]

ERROR Error: "Uncaught (in promise): ReferenceError: TouchEvent is not defined ./src/index.ts/graph_component_GraphComponent<@http://localhost:4200/app-pages-pages-module.js:77726:42 ./src/index.ts@http://localhost:4200/app-pages-pages-module.js:76843:53 __webpack_require__@http://localhost:4200/app-pages-pages-module.js:2817:12 ./node_modules/@swimlane/ngx-graph/release/index.js/</<@http://localhost:4200/app-pages-pages-module.js:2860:18 ./node_modules/@swimlane/ngx-graph/release/index.js/<@http://localhost:4200/app-pages-pages-module.js:2798:18 webpackUniversalModuleDefinition@http://localhost:4200/app-pages-pages-module.js:2795:20 ./node_modules/@swimlane/ngx-graph/release/index.js@http://localhost:4200/app-pages-pages-module.js:2793:11 __webpack_require__@http://localhost:4200/runtime.js:82:12 ./src/app/pages/widget/widget.module.ts@http://localhost:4200/app-pages-pages-module.js:138013:78 __webpack_require__@http://localhost:4200/runtime.js:82:12 ./src/app/pages/dashboard/dashboard.module.ts@http://localhost:4200/app-pages-pages-module.js:136572:79 __webpack_require__@http://localhost:4200/runtime.js:82:12 ./src/app/pages/pages.module.ts@http://localhost:4200/app-pages-pages-module.js:137104:85 __webpack_require__@http://localhost:4200/runtime.js:82:12 webpackAsyncContext/<@http://localhost:4200/main.js:66:16 ./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:7816:17 onInvoke@http://localhost:4200/vendor.js:41860:24 ./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:7815:17 ./node_modules/zone.js/dist/zone.js/</Zone.prototype.run@http://localhost:4200/polyfills.js:7566:24 scheduleResolveOrReject/<@http://localhost:4200/polyfills.js:8300:29 ./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.js:7849:17 onInvokeTask@http://localhost:4200/vendor.js:41851:24 ./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.js:7848:17 ./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask@http://localhost:4200/polyfills.js:7616:28 drainMicroTaskQueue@http://localhost:4200/polyfills.js:8023:25 "