'Failed to load resource rxjs

I just upgraded to rxjs 5.4.3 and now I am getting a error in the browser. In my package.json I have "rxjs": "5.4.3" installed so I am not sure why I am getting this error message?

ts file:

import { Injectable } from "@angular/core";
import { Subject } from "rxjs";

import { NoteDictionariesServiceModel } from "../../Models/ServiceModels/NoteServiceModels";

@Injectable()
export class NoteEditorContext {

    dictionaries: NoteDictionariesServiceModel;
    onContextInitialized = new Subject();

}

Error text:

Unhandled Promise rejection: (SystemJS) XHR error (403 Forbidden) loading http://localhost:52313/node_modules/rxjs
    Error: XHR error (403 Forbidden) loading http://localhost:52313/node_modules/rxjs
        at XMLHttpRequest.wrapFn (http://localhost:52313/node_modules/zone.js/dist/zone.js:1332:39)
        at ZoneDelegate.invokeTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:423:31)
        at Zone.runTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:195:47)
        at ZoneTask.invokeTask [as invoke] (http://localhost:52313/node_modules/zone.js/dist/zone.js:498:34)
        at invokeTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:1744:14)
        at XMLHttpRequest.globalZoneAwareCallback (http://localhost:52313/node_modules/zone.js/dist/zone.js:1770:17)
    Error loading http://localhost:52313/node_modules/rxjs as "rxjs" from http://localhost:52313/dist/debug/Components/StyleGuideNoteEditor/NoteEditorContext.js ; Zone: <root> ; Task: Promise.then ; Value: (SystemJS) XHR error (403 Forbidden) loading http://localhost:52313/node_modules/rxjs
    Error: XHR error (403 Forbidden) loading http://localhost:52313/node_modules/rxjs
        at XMLHttpRequest.wrapFn (http://localhost:52313/node_modules/zone.js/dist/zone.js:1332:39)
        at ZoneDelegate.invokeTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:423:31)
        at Zone.runTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:195:47)
        at ZoneTask.invokeTask [as invoke] (http://localhost:52313/node_modules/zone.js/dist/zone.js:498:34)
        at invokeTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:1744:14)
        at XMLHttpRequest.globalZoneAwareCallback (http://localhost:52313/node_modules/zone.js/dist/zone.js:1770:17)
    Error loading http://localhost:52313/node_modules/rxjs as "rxjs" from http://localhost:52313/dist/debug/Components/StyleGuideNoteEditor/NoteEditorContext.js (SystemJS) XHR error (403 Forbidden) loading http://localhost:52313/node_modules/rxjs
    Error: XHR error (403 Forbidden) loading http://localhost:52313/node_modules/rxjs
        at XMLHttpRequest.wrapFn (http://localhost:52313/node_modules/zone.js/dist/zone.js:1332:39)
        at ZoneDelegate.invokeTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:423:31)
        at Zone.runTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:195:47)
        at ZoneTask.invokeTask [as invoke] (http://localhost:52313/node_modules/zone.js/dist/zone.js:498:34)
        at invokeTask (http://localhost:52313/node_modules/zone.js/dist/zone.js:1744:14)
        at XMLHttpRequest.globalZoneAwareCallback (http://localhost:52313/node_modules/zone.js/dist/zone.js:1770:17)
    Error loading http://localhost:52313/node_modules/rxjs as "rxjs" from http://localhost:52313/dist/debug/Components/StyleGuideNoteEditor/NoteEditorContext.js

dependencies:

"dependencies": {
    "@angular/cli": "^6.2.1",
    "@angular/common": "4.4.7",
    "@angular/compiler": "4.4.7",
    "@angular/core": "4.4.7",
    "@angular/forms": "4.4.7",
    "@angular/http": "4.4.7",
    "@angular/platform-browser": "4.4.7",
    "@angular/platform-browser-dynamic": "4.4.7",
    "@angular/router": "4.4.7",
    "@angular/upgrade": "4.4.7",
    "a": "^2.1.2",
    "angular-in-memory-web-api": "0.2.5",
    "core-js": "^2.4.1",
    "debug": "^4.1.1",
    "gulp": "^4.0.2",
    "gulp-cli": "^2.3.0",
    "gulp-typedoc": "^1.2.1",
    "gulp4-run-sequence": "^1.0.1",
    "moment": "2.17.1",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.4.3",
    "systemjs": "0.19.39",
    "zone.js": "^0.8.4"
  },


Solution 1:[1]

According to this github page, the version of rxjs compatible with your angular version is 5.0.3.

You should downgrade to that.

I suggest that make your cli and core versions compatible to each other too.

Check your node.js version too.

That page will help you to find which version to upgrade or downgrade to.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mahdi Zarei