0
votes
  • I am trying to learn RxJs.
  • in package.json, I have installed rxjs but still why its throwing error [ts] Module '"c:/Users//Desktop/iooioi/src/main/webapp/node_modules/rxjs/Rx"' has no default export.
  • providing package.json below
  • I included like this import { rxjs } from "rxjs";
  • whole gist you can see it here https://gist.github.com/texirv0203/e071a9ebea3a6aa0f8a0c65d47f75807
{
  "name": "sports",
  "version": "1.0.0",
  "scripts": {
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "lite": "lite-server",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings",
    "test": "tsc && concurrently \"karma start karma.conf.js\"",
    "lint-ts": "tslint app/**/**.ts -t verbose -o staticCodeAnalysisReport.txt --force"
  },
  "license": "qqq",
  "dependencies": {
        "@types/underscore": "^1.8.1",
    "angular2-in-memory-web-api": "0.0.20",
    "bootstrap": "^3.3.6",
    "core-js": "^2.4.1",
    "jquery": "^3.1.1",
    "latest-version": "^2.0.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.12",
    "systemjs": "0.19.27",
    "zone.js": "^0.6.23"
    "@angular/common": "2.0.0",
    "@angular/compiler": "2.0.0",
    "@angular/core": "2.0.0",
    "@angular/forms": "2.0.0",
    "@angular/http": "2.0.0",
    "@angular/platform-browser": "2.0.0",
    "@angular/platform-browser-dynamic": "2.0.0",
    "@angular/router": "3.0.0",
    "@angular/upgrade": "2.0.0"

  },
  "devDependencies": {
    "karma": "^1.2.0",
    "karma-chrome-launcher": "^0.2.3",
    "karma-cli": "^0.1.2",
    "karma-htmlfile-reporter": "^0.2.2",
    "karma-jasmine": "^0.3.8",
    "jasmine-expect": "^3.0.1",
    "jasmine-jquery": "^2.1.1",
    "karma-coverage": "^1.1.1",
    "karma-jquery": "^0.1.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-typescript": "^2.1.4",
    "karma-typescript-preprocessor": "^0.3.0",
    "tslint": "^3.15.1",
    "tslint-config-ms-recommended": "^0.1.2"
    "concurrently": "^2.2.0",
    "lite-server": "^2.2.2",
    "typescript": "^2.0.2",
    "typings": "^1.3.2",
    "jasmine-core": "~2.4.1",

  }
}
1
Hey what does that mean - user8777683

1 Answers

0
votes

Try this

import {Observable,Subject} from "rxjs/Rx";

init them with Observable.create() , new Subject() or

import {Rx} from "rxjs";

then you can init them with Rx.Observable.create() , new Rx.Subject() etc