Exception is thrown - Observable_1.Observable.fromEvent is not a function
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => error_handler.js:48EXCEPTION: Error in ./AppComponent class AppComponent - inline template:1:0 caused by: Observable_1.Observable.fromEvent is not a function
This bug is reproduced in https://github.com/marjan-georgiev/Angular-CLI-NG2D3-Demo
Current behavior Graph is rendered and bug is thrown in console.
Expected behavior Bug should not be thrown
Reproduction of the problem cloned the repo and run the app … Exception is thrown and shown in console
package.json - dependancies
“dependencies”: { “@angular/common”: “~2.2.3”, “@angular/compiler”: “~2.2.3”, “@angular/core”: “~2.2.3”, “@angular/forms”: “~2.2.3”, “@angular/http”: “~2.2.3”, “@angular/platform-browser”: “~2.2.3”, “@angular/platform-browser-dynamic”: “~2.2.3”, “@angular/router”: “~3.1.0”, “core-js”: “^2.4.1”, “d3”: “^4.2.2”, “d3-array”: “^1.0.1”, “d3-brush”: “^1.0.3”, “d3-color”: “^1.0.2”, “d3-force”: “^1.0.3”, “d3-format”: “^1.0.2”, “d3-hierarchy”: “^1.0.2”, “d3-interpolate”: “^1.1.1”, “d3-scale”: “^1.0.3”, “d3-selection”: “^1.0.2”, “d3-shape”: “^1.0.3”, “moment”: “^2.14.1”, “ng2d3”: “^1.6.2”, “rxjs”: “5.0.0-beta.12”, “ts-helpers”: “^1.1.1”, “zone.js”: “^0.7.1” }, “devDependencies”: { “@types/d3”: “^4.3.0”, “@types/jasmine”: “^2.2.30”, “@types/node”: “^6.0.42”, “angular-cli”: “1.0.0-beta.18”, “codelyzer”: “1.0.0-beta.1”, “jasmine-core”: “2.4.1”, “jasmine-spec-reporter”: “2.5.0”, “karma”: “1.2.0”, “karma-chrome-launcher”: “^2.0.0”, “karma-cli”: “^1.0.1”, “karma-jasmine”: “^1.0.2”, “karma-remap-istanbul”: “^0.2.1”, “protractor”: “4.0.9”, “ts-node”: “1.2.1”, “tslint”: “3.13.0”, “typescript”: “~2.0.3” }
Uploaded screenshot of the exception thrown
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Having same issue with
ngx-datatable
and sorting. Should I create an issue in corresponding repository as well?As I was able to find out, the issue with
LongPressDirective
.fromEvent
is incorrectly imported. Could that be fixed? Thank you.ERROR TypeError: WEBPACK_IMPORTED_MODULE_1_rxjs_Observable.Observable.fromEvent is not a function at BarVerticalComponent…/src/common/base-chart.component.ts.BaseChartComponent.bindWindowResizeEvent (index.js:7220) at BarVerticalComponent…/src/common/base-chart.component.ts.BaseChartComponent.ngAfterViewInit (index.js:7135)
What’s going on? This is in Angular 7. I’ve attached my package.json file:
{ “name”: “app”, “version”: “0.0.0”, “scripts”: { “ng”: “ng”, “start”: “ng serve”, “build”: “ng build”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e” }, “private”: true, “dependencies”: { “@angular/animations”: “~7.2.0”, “@angular/cdk”: “^7.2.1”, “@angular/common”: “~7.2.0”, “@angular/compiler”: “~7.2.0”, “@angular/core”: “~7.2.0”, “@angular/forms”: “~7.2.0”, “@angular/http”: “^7.2.15”, “@angular/material”: “^7.2.1”, “@angular/platform-browser”: “~7.2.0”, “@angular/platform-browser-dynamic”: “~7.2.0”, “@angular/router”: “~7.2.0”, “@fortawesome/fontawesome-free”: “^5.9.0”, “@swimlane/ngx-charts”: “^6.0.0”, “@swimlane/ngx-ui”: “^17.2.9”, “@types/arcgis-js-api”: “^4.11.0”, “@types/d3-shape”: “^1.3.1”, “bootstrap”: “^4.3.1”, “core-js”: “^2.5.4”, “d3”: “4.10.0”, “esri-loader”: “^2.9.2”, “hammerjs”: “^2.0.8”, “jquery”: “^3.4.1”, “lodash”: “^4.17.11”, “moment”: “^2.24.0”, “ngx-daterangepicker-material”: “^2.1.6”, “rxjs”: “6.3.3”, “rxjs-compat”: “6.3.3”, “tslib”: “^1.9.0”, “zone.js”: “~0.8.26” }, “devDependencies”: { “@angular-devkit/build-angular”: “~0.12.0”, “@angular/cli”: “~7.2.0”, “@angular/compiler-cli”: “~7.2.0”, “@angular/language-service”: “~7.2.0”, “@types/node”: “~8.9.4”, “@types/jasmine”: “~2.8.8”, “@types/jasminewd2”: “~2.0.3”, “codelyzer”: “~4.5.0”, “jasmine-core”: “~2.99.1”, “jasmine-spec-reporter”: “~4.2.1”, “karma”: “~3.1.1”, “karma-chrome-launcher”: “~2.2.0”, “karma-coverage-istanbul-reporter”: “~2.0.1”, “karma-jasmine”: “~1.1.2”, “karma-jasmine-html-reporter”: “^0.2.2”, “protractor”: “~5.4.0”, “ts-node”: “~7.0.0”, “tslint”: “~5.11.0”, “typescript”: “~3.2.2” } }