2016-08-31 6 views
3

問題はタイトルにあります。私が読んだことのすべては、タイピングの問題だと言いますが、私はそれをまだ追跡できていません。それはかなり大規模なプロジェクトですので、私は私の設定のいくつかの例をあげる:角2 RC.5&VS 2015:名前 'module'、 'Set'、 'Map'、 'MapConstructor'、 'SetConstructor'を見つけることができません

tsconfig.json

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

typings.json

{ 
    "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+20160807145350" 
    } 
} 

パッケージ。 json

{ 
    "name": "angular2-quickstart", 
    "version": "1.0.0", 
    "scripts": { 
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", 
    "lite": "lite-server", 
    "postinstall": "typings install", 
    "tsc": "tsc", 
    "tsc:w": "tsc -w", 
    "typings": "typings" 
    }, 
    "license": "ISC", 
    "dependencies": { 
    "@angular/common": "2.0.0-rc.5", 
    "@angular/compiler": "2.0.0-rc.5", 
    "@angular/core": "2.0.0-rc.5", 
    "@angular/compiler-cli": "0.5.0", 
    "@angular/forms": "0.3.0", 
    "@angular/http": "2.0.0-rc.5", 
    "@angular/platform-browser": "2.0.0-rc.5", 
    "@angular/platform-browser-dynamic": "2.0.0-rc.5", 
    "@angular/router": "3.0.0-rc.1", 
    "@angular/router-deprecated": "2.0.0-rc.2", 
    "@angular/upgrade": "2.0.0-rc.5", 
    "angular2-in-memory-web-api": "0.0.17", 
    "bootstrap": "^3.3.6", 
    "core-js": "^2.4.0", 
    "reflect-metadata": "^0.1.3", 
    "rxjs": "5.0.0-beta.6", 
    "systemjs": "0.19.27", 
    "zone.js": "^0.6.12" 
    }, 
    "devDependencies": { 
    "concurrently": "^2.0.0", 
    "lite-server": "^2.2.0", 
    "typescript": "^1.8.10", 
    "typings":"^1.3.3" 
    } 
} 

私が試してみました物事:

  1. 参照タイピングはcompilerOptionsを変更する
  2. 私のアプリのエントリポイントに直接ファイル - > ES6/es2015にターゲット
  3. アンインストールし、ルート
  4. 更新でタイピングの参照を再インストールします最新バージョンへのタイピング.json
  5. es6-shimとそのタイプのインストール

その他のご提案は大変ありがとうございます。

enter image description here

+0

VS 2015を使用しているようですが、[VISUAL STUDIO 2015 QUICKSTARTガイド](https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html)にチェックを入れましたか? –

+0

はい私はそれをプロジェクトの設定時に専ら追ってきました。これは、プロジェクトを数ヶ月間正常に処理した後の最近の問題(過去2日間)です。 – ddpdoj

+0

あなたの質問に答えるのではなく、私の経験を共有するだけです。私はVisual Studioを使用しましたが、私はvscodeを使用して以来、私はフロントエンドのプロジェクトに戻ってほしくないです。フロントエンド開発にはるかに高速で優れています –

答えて

1

あなたpackage.jsonは、上記"typescript":"^1.8.10"を持っていますが、あなたは最後の一日か二日で2.0.2に更新した場合には、活字体でthis bugである可能性があります。その場合は、以前のバージョンにダウングレードして修正する必要があります。

エラーメッセージは、angular-cli プロジェクトのthis issueで報告されたエラーメッセージとよく似ています。

0

はほとんど私がプロジェクトからnugetパッケージTypescript.CompilerとTypescript.MsBuildを削除することで、これを解決する...この質問について

を忘れてしまいました。

関連する問題