2016-08-10 8 views
0

このエラーが発生する理由はわかりません。私のプロジェクトは以前よりうまく動作していました。プロジェクトのディレクトリの外にgulpやyoのようなパッケージをグローバルにインストールしました。プロジェクトを停止して再起動すると、以下のエラーが表示されます。ノードサーバーはまだ稼動していますが、npmを実行すると、tsc:-wが実行され、以下のエラーが端末に表示されます。私はNPMを使用Angular2プロジェクトを開始しようとしたときにエラーが表示されますか?

package.json内のスクリプトであるを開始します。

"スタート": "TSC & &同時に\" NPMの実行TSC:\ワット "\" ノードサーバ/インデックス。 JS \」」、

../app/app.ts(11,5): error TS2345: Argument of type '{ selector: string; viewBindings: typeof NamesList[]; }' is not assignable to parameter of type '{ selector?: string; properties?: List<string>; events?: List<string>; host?: StringMap<string, s...'. 
     Object literal may only specify known properties, and 'viewBindings' does not exist in type '{ selector?: string; properties?: List<string>; events?: List<string>; host?: StringMap<string, s...'. 
    ../app/app.ts(17,2): error TS2345: Argument of type 'typeof App' is not assignable to parameter of type 'Type'. 
     Type 'App' is not assignable to type 'Type'. 
     Property 'apply' is missing in type 'App'. 
    ../app/components/about/about.ts(5,2): error TS2345: Argument of type 'typeof About' is not assignable to parameter of type 'Type'. 
     Type 'About' is not assignable to type 'Type'. 
     Property 'apply' is missing in type 'About'. 
    ../app/components/about/about.ts(8,2): error TS2345: Argument of type 'typeof About' is not assignable to parameter of type 'Type'. 
    ../app/components/home/home.ts(4,2): error TS2345: Argument of type 'typeof Home' is not assignable to parameter of type 'Type'. 
     Type 'Home' is not assignable to type 'Type'. 
     Property 'apply' is missing in type 'Home'. 
    ../app/components/home/home.ts(7,2): error TS2345: Argument of type 'typeof Home' is not assignable to parameter of type 'Type'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(21,12): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(23,18): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(25,17): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(27,29): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(30,27): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(49,37): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/change_detection/parser/parser.d.ts(60,36): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/element_binder.d.ts(6,12): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/element_binder.d.ts(8,23): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/element_binder.d.ts(13,24): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/element_binder.d.ts(13,70): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/element_injector.d.ts(98,12): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/element_injector.d.ts(112,54): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/query_list.d.ts(22,6): error TS2304: Cannot find name 'Symbol'. 
    ../node_modules/angular2/src/core/compiler/view.d.ts(69,81): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/view.d.ts(97,58): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/compiler/view.d.ts(111,104): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/core/zone/ng_zone.d.ts(2,37): error TS2304: Cannot find name 'Zone'. 
    ../node_modules/angular2/src/di/injector.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition. 
    ../node_modules/angular2/src/di/injector.d.ts(1,1): error TS6053: File '/home/angular2/typings/es6-promise/es6-promise.d.ts' not found. 
    ../node_modules/angular2/src/facade/async.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition. 
    ../node_modules/angular2/src/facade/async.d.ts(1,1): error TS6053: File '/home/angular2/typings/es6-promise/es6-promise.d.ts' not found. 
    ../node_modules/angular2/src/facade/async.d.ts(2,1): error TS6053: File '/home/angular2/typings/rx/rx.d.ts' not found. 
    ../node_modules/angular2/src/facade/async.d.ts(4,10): error TS2661: Cannot re-export name that is not defined in the module. 
    ../node_modules/angular2/src/facade/async.d.ts(20,45): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/async.d.ts(20,51): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/async.d.ts(21,29): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/async.d.ts(22,46): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/async.d.ts(22,52): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/async.d.ts(23,30): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition. 
    ../node_modules/angular2/src/facade/lang.d.ts(1,1): error TS6053: File '/home/angular2/globals.d.ts' not found. 
    ../node_modules/angular2/src/facade/lang.d.ts(2,22): error TS2304: Cannot find name 'BrowserNodeGlobal'. 
    ../node_modules/angular2/src/facade/lang.d.ts(31,43): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(31,49): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(47,50): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(48,63): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(50,31): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(51,41): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(59,40): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(59,51): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(62,43): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(77,47): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(79,45): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(80,42): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(80,48): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,25): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,38): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,49): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,61): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,76): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,91): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(116,111): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(117,27): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/facade/lang.d.ts(118,34): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/http/enums.d.ts(46,23): error TS2304: Cannot find name 'int'. 
    ../node_modules/angular2/src/http/interfaces.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition. 
    ../node_modules/angular2/src/http/interfaces.d.ts(1,1): error TS6053: File '/home/angular2/typings/rx/rx.d.ts' not found. 
    ../node_modules/angular2/src/profile/profile.d.ts(1,28): error TS2307: Cannot find module './wtf_impl'. 
    ../node_modules/angular2/src/profile/profile.d.ts(2,23): error TS2307: Cannot find module './wtf_impl'. 
    ../node_modules/angular2/src/render/dom/view/shared_styles_host.d.ts(3,27): error TS2304: Cannot find name 'Set'. 
    ../node_modules/angular2/src/router/instruction.d.ts(1,32): error TS2307: Cannot find module './path_recognizer'. 
    ../node_modules/angular2/src/router/route_recognizer.d.ts(1,32): error TS2307: Cannot find module './path_recognizer'. 
    6:45:32 PM - Compilation complete. Watching for file changes. 

答えて

0

あなたは正しくタイピングをインストールしていますか?

  1. NPM経由でグローバルにインストール - $のNPMは、プロジェクトの
  2. --globalタイピングをインストール - $タイピングが

    をインストールするには、ファイアウォールの後ろにいる場合にも、あなたが追加する必要があります.typingssrcファイルをプロジェクトルートに追加する - タイピングのプロジェクトインストールは、ファイアウォールの側面から出なければならず、npmプロキシ設定を使用できません。

.typingssrc(ファイル名) { "プロキシ": "のhttp:// <>> /プロキシサーバーの追加" を、 "rejectUnauthorized":偽 }

関連する問題