0
votes

I am migrating from angular 5 to angular 6 . When I tried to do ng serve I get.

ERROR in ./node_modules/@ng-idle/core/src/eventtargetinterruptsource.js Module not found: Error: Can't resolve 'rxjs/Subscription' in 'C:\Users\infouser\git\branches\Orion-App\orion-ui\node_modules@ng-idle\core\src' ERROR in ./node_modules/@ng-idle/core/src/eventtargetinterruptsource.js Module not found: Error: Can't resolve 'rxjs/add/observable/fromEvent' in 'C:\Users\infouser\git\branches\Orion-App\orion-ui\node_modules@ng-idle\core\src' ERROR in ./node_modules/@ng-idle/core/src/eventtargetinterruptsource.js Module not found: Error: Can't resolve 'rxjs/add/observable/merge' in 'C:\Users\infouser\git\branches\Orion-App\orion-ui\node_modules@ng-idle\core\src' ERROR in ./node_modules/@ng-idle/core/src/eventtargetinterruptsource.js Module not found: Error: Can't resolve 'rxjs/add/operator/filter' in 'C:\Users\infouser\git\branches\Orion-App\orion-ui\node_modules@ng-idle\core\src' ERROR in ./node_modules/@ng-idle/core/src/eventtargetinterruptsource.js Module not found: Error: Can't resolve 'rxjs/add/operator/throttleTime' in 'C:\Users\infouser\git\branches\Orion-App\orion-ui\node_modules@ng-idle\core\src'

This is my package.json file

{
  "name": "orion-upgrade",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --proxy-config proxy.conf.json --disable-host-check",
    "build": "ng build --configuration=develop --prod --aot --output-hashing=all --base-href .",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.1.10",
    "@angular/cdk": "^6.4.7",
    "@angular/common": "^6.1.10",
    "@angular/compiler": "^6.1.10",
    "@angular/core": "^6.1.10",
    "@angular/flex-layout": "^6.0.0-beta.15",
    "@angular/forms": "^6.1.10",
    "@angular/http": "^6.1.10",
    "@angular/material": "^6.4.7",
    "@angular/platform-browser": "^6.1.10",
    "@angular/platform-browser-dynamic": "^6.1.10",
    "@angular/router": "^6.1.10",
    "@ng-idle/core": "^2.0.0-beta.15",
    "@ng-idle/keepalive": "^2.0.0-beta.15",
    "@types/crypto-js": "^3.1.43",
    "angular-font-awesome": "^3.1.2",
    "core-js": "^2.6.5",
    "crypto-js": "^3.1.9-1",
    "file-saver": "^1.3.8",
    "font-awesome": "^4.7.0",
    "hammerjs": "^2.0.8",
    "rxjs": "6.1.0",
    "tslib": "^1.9.0",
    "xlsx": "^0.14.2",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.0",
    "@angular/cli": "^6.2.9",
    "@angular/compiler-cli": "^6.1.10",
    "@angular/language-service": "^6.1.10",
    "@types/jasmine": "^2.8.16",
    "@types/jasminewd2": "^2.0.6",
    "@types/node": "^6.14.4",
    "ajv": "^6.10.0",
    "codelyzer": "^4.5.0",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.4.3",
    "karma-jasmine": "^1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.4.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "^2.7.2"
  },
  "description": "This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.8.",
  "main": "karma.conf.js",
  "repository": {
    "type": "git",
    "url": "git+ssh://[email protected]/Yuncheng_He/orion-angular-4.git"
  },
  "author": "",
  "homepage": "https://bitbucket.org/Yuncheng_He/orion-angular-4#readme"
}

Can any one tell me How to resolve this error.

1

1 Answers

0
votes

try importing observables and operators like

import { Observable, Subscriber } from 'rxjs';
import { tap, map, filter } from 'rxjs/operators';