无法加载资源RXJS
我刚刚升级到rxjs 5.4.3
,现在我在浏览器中遇到了一个错误。在我的package.json
中,我有“ rxjs”:“ 5.4.3”
安装了,所以我不确定为什么我会收到此错误消息?
TS文件:
import { Injectable } from "@angular/core";
import { Subject } from "rxjs";
import { NoteDictionariesServiceModel } from "../../Models/ServiceModels/NoteServiceModels";
@Injectable()
export class NoteEditorContext {
dictionaries: NoteDictionariesServiceModel;
onContextInitialized = new Subject();
}
错误文本:
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": {
"@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"
},
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"
},
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 this github页面, github Page, rxjs 5.0.3 。
您应该降级。
我建议将您的
CLI
和core
版本也彼此兼容。还检查您的
node.js
版本。该页面将帮助您找到升级或降级到的版本。
According to this github page, the version of
rxjs
compatible with your angular version is5.0.3
.You should downgrade to that.
I suggest that make your
cli
andcore
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.