2016-08-02 30 views
0

Ich änderte Angular2 Beta 15 Version auf RC-Version und ich habe einige Fehler beim Ausführen der Anwendung.Fehler bei npm Start mit Angular 2 RC Version

typings/browser/ambient/es6-shim/index.d.ts(8,14): error TS2300: Duplicate identifier 'PropertyKey'. 
typings/browser/ambient/es6-shim/index.d.ts(11,5): error TS2300: Duplicate identifier 'done'. 
typings/browser/ambient/es6-shim/index.d.ts(12,5): error TS2300: Duplicate identifier 'value'. 
typings/browser/ambient/es6-shim/index.d.ts(250,5): error TS2300: Duplicate identifier 'EPSILON'. 
typings/browser/ambient/es6-shim/index.d.ts(285,5): error TS2300: Duplicate identifier 'MAX_SAFE_INTEGER'. 
typings/browser/ambient/es6-shim/index.d.ts(292,5): error TS2300: Duplicate identifier 'MIN_SAFE_INTEGER'. 
typings/browser/ambient/es6-shim/index.d.ts(348,5): error TS2300: Duplicate identifier 'flags'. 
typings/browser/ambient/es6-shim/index.d.ts(500,5): error TS2300: Duplicate identifier 'prototype'. 
typings/browser/ambient/es6-shim/index.d.ts(563,5): error TS2300: Duplicate identifier 'size'. 
typings/browser/ambient/es6-shim/index.d.ts(572,5): error TS2300: Duplicate identifier 'prototype'. 
typings/browser/ambient/es6-shim/index.d.ts(583,5): error TS2300: Duplicate identifier 'size'. 
typings/browser/ambient/es6-shim/index.d.ts(592,5): error TS2300: Duplicate identifier 'prototype'. 
typings/browser/ambient/es6-shim/index.d.ts(607,5): error TS2300: Duplicate identifier 'prototype'. 
typings/browser/ambient/es6-shim/index.d.ts(621,5): error TS2300: Duplicate identifier 'prototype'. 
typings/globals/core-js/index.d.ts(3,14): error TS2300: Duplicate identifier 'PropertyKey'. 
typings/globals/core-js/index.d.ts(217,5): error TS2300: Duplicate identifier 'flags'. 
typings/globals/core-js/index.d.ts(231,5): error TS2300: Duplicate identifier 'EPSILON'. 
typings/globals/core-js/index.d.ts(266,5): error TS2300: Duplicate identifier 'MAX_SAFE_INTEGER'. 
typings/globals/core-js/index.d.ts(273,5): error TS2300: Duplicate identifier 'MIN_SAFE_INTEGER'. 
typings/globals/core-js/index.d.ts(583,5): error TS2300: Duplicate identifier 'size'. 
typings/globals/core-js/index.d.ts(589,5): error TS2300: Duplicate identifier 'prototype'. 
typings/globals/core-js/index.d.ts(600,5): error TS2300: Duplicate identifier 'size'. 
typings/globals/core-js/index.d.ts(606,5): error TS2300: Duplicate identifier 'prototype'. 
typings/globals/core-js/index.d.ts(621,5): error TS2300: Duplicate identifier 'prototype'. 
typings/globals/core-js/index.d.ts(635,5): error TS2300: Duplicate identifier 'prototype'. 
typings/globals/core-js/index.d.ts(646,5): error TS2300: Duplicate identifier 'done'. 
typings/globals/core-js/index.d.ts(647,5): error TS2300: Duplicate identifier 'value'. 
typings/globals/core-js/index.d.ts(759,5): error TS2300: Duplicate identifier 'prototype'. 

Können Sie mir helfen, dieses Problem zu beheben? Ich bin ein Neuling in Angular2.

Meine JSON-Datei typings.json sieht wie folgt aus:

{ 
    "ambientDependencies": { 
     "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd" 
    } 
} 

Antwort

1

Ihre typings.json Datei eine veraltete Syntax verwendet: es ist mit ambientDependencies statt globalDependencies. Auch verwendet der Angular RC den es6-shim nicht mehr.

Entfernen Sie Ihren Typisierungsordner, aktualisieren Sie Ihre typings.json Datei und installieren Sie sie erneut.

aktualisieren Sie typings.json wie folgt:

{ 
    "globalDependencies": { 
    "core-js": "registry:dt/core-js#0.0.0+20160602141332", 
    "jasmine": "registry:dt/jasmine#2.2.0+20160621224255", 
    "node": "registry:dt/node#6.0.0+20160621231320" 
    } 
} 
0

In typings.json Umbenennen:

ambientDevDependencies zu globalDevDependencies

ambientDependencies zu globalDependencies

Dann an der Konsole:

$ Typisierungen installieren

├── es6-Beilage (global)

├── Winkel-Transporteur (global dev)

├── Jasmin (global dev)

└── selen-webdriver (globaler Entwickler)