2017-06-08 10 views
0

Während ich Angular 4-Anwendung mit Visual Studio entwickelte, habe ich versucht, einige Angular-Bibliotheken zu installieren und zu deinstallieren. Und plötzlich fand ich die folgenden Kompilierungsfehler in Visual StudioAngular Typescript-Bibliotheken kompilieren in Visual Studio plötzlich nicht

Severity Code Description Project File Line Suppression State 
Error TS2300 Duplicate identifier 'PropertyKey'. TypeScript Virtual Projects C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\lib.es2015.core.d.ts 21 Active 
Error TS2403 Subsequent variable declarations must have the same type. Variable 'prototype' must be of type 'WeakSet<object>', but here has type 'WeakSet<any>'. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 620 Active 
Error TS2403 Subsequent variable declarations must have the same type. Variable 'prototype' must be of type 'WeakSet<object>', but here has type 'WeakSet<any>'. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 620 Active 
Error TS2403 Subsequent variable declarations must have the same type. Variable 'prototype' must be of type 'WeakMap<object, any>', but here has type 'WeakMap<any, any>'. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 606 Active 
Error TS2403 Subsequent variable declarations must have the same type. Variable 'prototype' must be of type 'WeakMap<object, any>', but here has type 'WeakMap<any, any>'. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 606 Active 
Error TS2300 Duplicate identifier 'PropertyKey'. TypeScript Virtual Projects C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\lib.es2015.core.d.ts 21 Active 
Error TS2300 Duplicate identifier 'PropertyKey'. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 7 Active 
Error TS2300 Duplicate identifier 'PropertyKey'. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 7 Active 
Error  Build:Subsequent variable declarations must have the same type. Variable 'prototype' must be of type 'WeakSet<object>', but here has type 'WeakSet<any>'. XX XX\node_modules\@types\es6-shim\index.d.ts 620 
Error  Build:Subsequent variable declarations must have the same type. Variable 'prototype' must be of type 'WeakMap<object, any>', but here has type 'WeakMap<any, any>'. XX XX\node_modules\@types\es6-shim\index.d.ts 606 
Error  Build:Duplicate identifier 'PropertyKey'. XX C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3\lib.es2015.core.d.ts 21 
Error  Build:Duplicate identifier 'PropertyKey'. XX XX\node_modules\@types\es6-shim\index.d.ts 7 
Error  Build:All declarations of 'value' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 11 
Error  Build:All declarations of 'size' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 561 
Error  Build:All declarations of 'size' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 581 
Error  Build:All declarations of 'prototype' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 498 
Error  Build:All declarations of 'prototype' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 570 
Error  Build:All declarations of 'prototype' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 591 
Error  Build:All declarations of 'prototype' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 606 
Error  Build:All declarations of 'prototype' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 620 
Error  Build:All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 290 
Error  Build:All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 283 
Error  Build:All declarations of 'flags' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 346 
Error  Build:All declarations of 'EPSILON' must have identical modifiers. XX XX\node_modules\@types\es6-shim\index.d.ts 248 
Error TS2687 All declarations of 'value' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 11 Active 
Error TS2687 All declarations of 'value' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 11 Active 
Error TS2687 All declarations of 'size' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 561 Active 
Error TS2687 All declarations of 'size' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 561 Active 
Error TS2687 All declarations of 'size' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 581 Active 
Error TS2687 All declarations of 'size' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 581 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 498 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 498 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 570 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 570 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 591 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 591 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 606 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 606 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 620 Active 
Error TS2687 All declarations of 'prototype' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 620 Active 
Error TS2687 All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 290 Active 
Error TS2687 All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 290 Active 
Error TS2687 All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 283 Active 
Error TS2687 All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 283 Active 
Error TS2687 All declarations of 'flags' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 346 Active 
Error TS2687 All declarations of 'flags' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 346 Active 
Error TS2687 All declarations of 'EPSILON' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 248 Active 
Error TS2687 All declarations of 'EPSILON' must have identical modifiers. TypeScript Virtual Projects XX\node_modules\@types\es6-shim\index.d.ts 248 Active 

Wie behebe ich diese Kompilierungsfehler?

Antwort

1

Ich habe diese Kompilierungsfehlern durch Löschen der NPM-Pakete von meinem Visual Studio-Projekt festgelegt und neu installieren sie wieder folgend

  1. Zum Webprojekt Ordner und löschen „node_modules“ -Ordner
  2. offene Fenster Befehl als Administrator
  3. schreiben cd "{project folder path that contains package.json}"
  4. dann schreiben npm install
Verwandte Themen