2015-12-31 24 views
2

你好,ASP.NET 5 MVC6角2(Beta版0) - 複製承諾

我收到了我的MVC6角(Beta版0)項目生成錯誤。 我試圖建立項目發現在: https://angular.io/guide/quickstart

「複製標識 '無極'」

它似乎在這兩個定義:

  • ES6-shim.d .TS
  • ES6-promise.d.ts

我TSCON fig.json如下:

{ 
    "compilerOptions": { 
    "target": "es5", 
    "module": "system", 
    "moduleResolution": "node", 
    "sourceMap": true, 
    "emitDecoratorMetadata": true, 
    "experimentalDecorators": true, 
    "removeComments": false, 
    "noImplicitAny": false 
    }, 
    "exclude": [ 
    "node_modules", 
    "wwwroot" 
    ] 
} 

如果我改變上述設置ES6,我得到了一大堆更多的錯誤。 例如重複的標識符

完成,EPSILON,flags,MAX_SAFE_INTEGER,Promise,PropertyKey,原型,大小,值。

我真的很掙扎,如果可能的話,我寧願避免任何'黑客'。

注意:我正在使用VS2015 Update 1(在編譯時自動編譯爲TS)。

我的package.json如下:

{ 
    "name": "ASP.NET", 
    "version": "0.0.0", 
    "scripts": { 
    "tsc": "tsc", 
    "tsc:w": "tsc -w", 
    "lite": "lite-server", 
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" " 
    }, 
    "dependencies": { 
    "angular2": "2.0.0-beta.0", 
    "systemjs": "0.19.6", 
    "es6-promise": "^3.0.2", 
    "es6-shim": "^0.33.3", 
    "reflect-metadata": "0.1.2", 
    "rxjs": "5.0.0-beta.0", 
    "zone.js": "0.5.10" 
    }, 
    "devDependencies": { 
    "gulp": "3.8.11", 
    "gulp-concat": "2.5.2", 
    "gulp-cssmin": "0.1.7", 
    "gulp-uglify": "1.2.0", 
    "rimraf": "2.2.8", 
    "concurrently": "^1.0.0", 
    "lite-server": "^1.3.1", 
    "typescript": "^1.7.3" 
    } 
} 

我很感激那些在外地工作的解決方案,但請不破解,如果在所有可能的。

回答

3

建議您刪除typings,node_modules目錄和tsd.json然後,npm install && tsd init && tsd install angular2 --resolve --save因爲它似乎有一些遺留問題。 typings角度將如下所示(沒有承諾): screenshot

+0

看起來它已經解決了重複承諾的問題,甚至可以用於es6選項選擇!我現在需要解決「無法找到模塊'angular2/core'」和「找不到模塊'angular2/platform/browser'」的問題。 – DanAbdn

+0

注意:解析軟件包適用於es5而不適用於es6。 es6給出了很多錯誤。關於完成,EPSILON,標誌,MAX_SAFE_INTEGER,Promise,PropertyKey,原型,大小,值 – DanAbdn