Angular cli(404 Not Found)加载http:// localhost:4200 / symbol-observable

时间:2016-07-07 13:57:43

标签: angularjs angular-cli

角度cli更新到beta 9之后出现问题:

Failed to load resource: the server responded with a status of 404 (Not Found)
zone.js:461 Unhandled Promise rejection: (SystemJS) Error: XHR error (404 Not Found) loading http://localhost:4200/symbol-observable
        at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:4200/vendor/zone.js/dist/zone.js:769:30)
        at ZoneDelegate.invokeTask (http://localhost:4200/vendor/zone.js/dist/zone.js:356:38)
        at Zone.runTask (http://localhost:4200/vendor/zone.js/dist/zone.js:256:48)
        at XMLHttpRequest.ZoneTask.invoke (http://localhost:4200/vendor/zone.js/dist/zone.js:423:34)
    Error loading http://localhost:4200/symbol-observable as "symbol-observable" from http://localhost:4200/vendor/rxjs/Observable.js ; Zone: <root> ; Task: Promise.then ; Value: Error: (SystemJS) Error: XHR error (404 Not Found) loading http://localhost:4200/symbol-observable(…)consoleError @ zone.js:461
zone.js:463 Error: Uncaught (in promise): Error: (SystemJS) Error: XHR error (404 Not Found) loading http://localhost:4200/symbol-observable(…)consoleError @ zone.js:463
http://localhost:4200/symbol-observable Failed to load resource: the server responded with a status of 404 (Not Found)

已安装我的package.json。更新至最新。 像错误和答案的XHR确实解决了它。 我该如何解决这个问题。

1 个答案:

答案 0 :(得分:3)

可能有一个更好的解决方案,但我无法使用angular-cli生成的应用程序来处理rxjs 5.0.0-beta.6以上的任何内容。所以:

npm install rxjs@5.0.0-beta.6 --save

然后

ng build

为我修好了。