2016-07-01 168 views
0

我在Package.json中更新了以下的angular2引用,但更新後,現在我在瀏覽器控制檯中收到以下404錯誤:升級到angular-2.0.0-rc.4後無法找到模塊錯誤

Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/async Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/collection Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/exceptions Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/core Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/platform/dom/dom_adapter Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/promise Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/core/util/decorators Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/collection Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/core/di/decorators Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/core/reflection/reflection Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/exceptions Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/core Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/lang Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/core/di/decorators Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/core/reflection/reflection Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/async Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/facade/promise Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/platform/dom/dom_adapter Failed to load resource: the server responded with a status of 404 (Not Found) 
http://localhost:55413/angular2/src/core/util/decorators Failed to load resource: the server responded with a status of 404 (Not Found) 

儘管現在正在編譯,但我仍然在Visual Studio IDE中收到以下錯誤。

Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\bindCallback.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\bindNodeCallback.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\combineLatest.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\concat.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\defer.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\empty.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\forkJoin.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\from.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\fromEvent.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\fromEventPattern.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\fromPromise.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\interval.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\merge.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\never.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\of.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\race.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\range.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\timer.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\observable\zip.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\audit.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\auditTime.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\buffer.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\bufferCount.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\bufferTime.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\bufferToggle.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\bufferWhen.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\cache.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\catch.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\combineAll.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\combineLatest.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\concat.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\concatAll.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\concatMap.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\concatMapTo.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\count.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\debounce.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\debounceTime.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\defaultIfEmpty.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\delay.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\delayWhen.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\dematerialize.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\distinctUntilChanged.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\do.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\every.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\expand.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\filter.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\finally.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\first.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\groupBy.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\ignoreElements.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\last.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\let.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\map.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\mapTo.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\materialize.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\merge.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\mergeAll.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\mergeMap.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\mergeMapTo.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\multicast.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\observeOn.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\partition.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\pluck.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\publish.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\publishBehavior.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\publishLast.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\publishReplay.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\race.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\reduce.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\repeat.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\retry.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\retryWhen.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\sample.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\sampleTime.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\scan.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\share.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\single.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\skip.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\skipUntil.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\skipWhile.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\startWith.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\subscribeOn.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\switch.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\switchMap.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\switchMapTo.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\take.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\takeLast.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\takeUntil.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\takeWhile.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\throttle.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\throttleTime.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\timeout.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\timeoutWith.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\toArray.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\toPromise.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\window.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\windowCount.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\windowTime.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\windowToggle.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\windowWhen.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\withLatestFrom.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\zip.d.ts 2 Active 
Error TS2664 Invalid module name in augmentation, module '../../Observable' cannot be found. TypeScript Virtual Projects ..\node_modules\rxjs\add\operator\zipAll.d.ts 2 Active 

我的package.json文件,如下所示:

{ 
    "name": "ASP.NET", 
    "version": "0.0.0", 
    "dependencies": { 
    "@angular/core": "2.0.0-rc.4", 
    "@angular/http": "2.0.0-rc.4", 
    "@angular/platform-browser": "^2.0.0-rc.4", 
    "bootstrap": "3.3.6", 
    "es6-promise": "3.2.1", 
    "es6-shim": "0.35.1", 
    "jquery": "3.0.0", 
    "reflect-metadata": "0.1.3", 
    "rxjs": "5.0.0-beta.6", 
    "systemjs": "0.19.31", 
    "zone.js": "0.6.12" 
    }, 
    "devDependencies": { 
    "gulp": "3.9.1", 
    "gulp-concat": "2.6.0", 
    "gulp-cssmin": "0.1.7", 
    "gulp-uglify": "1.5.4", 
    "rimraf": "2.5.2" 
    } 
} 

我tsconfig.json文件如下

{ 
    "compilerOptions": { 
    "emitDecoratorMetadata": true, 
    "experimentalDecorators": true, 
    "module": "commonjs", 
    "noEmitOnError": true, 
    "noImplicitAny": false, 
    "outDir": "../wwwroot/appScripts/", 
    "removeComments": false, 
    "sourceMap": true, 
    "target": "es5" 
    }, 
    "exclude": [ 
    "node_modules", 
    "typings/browser/", 
    "typings/browser.d.ts" 
    ] 
} 

什麼是我失蹤了嗎?我是否還需要添加其他參考?

+0

您是否嘗試關閉並重新打開Visual代碼 – AngJobs

回答

1

你真正需要

 
"@angular/common": "^2.0.0-rc.4", 
"@angular/compiler": "^2.0.0-rc.4", 
"@angular/platform-browser": "^2.0.0-rc.4" 
你devDependencies

當你包括 「@角/ HTTP」

和rxjs應該使用

"rxjs": "5.0.0-beta.6"

+0

是否有背後'5.0.0-beta.6'理由嗎?我也遇到過beta.9的問題,但不知道該版本有什麼問題。 – estus

+0

我根據您的評論更新了我的package.json,但我在Visual Studio IDE中遇到了122個錯誤。它仍然在編譯,但我的瀏覽器控制檯中出現了一些404錯誤,並且我的應用程序停止工作...請找到已編輯的錯誤消息 – Krishnan

+0

@estus我認爲我只是按照角度團隊的方式進行操作。我不知道原因。 – maxisam