2016-05-12 16 views
1

私のプロジェクトをAngular2 "2.0.0-beta.17"からAngular2 "2.0.0-rc.1"モジュールが見つかりません:エラー: 'angular2/bundles/angular2-polyfills'モジュールを解決できません。

に移行しています

しかし、私のプロジェクトを構築しながら、私は次のエラーを取得する:

を次のように

Uncaught Error: Cannot find module "angular2/bundles/angular2-polyfills" 
Uncaught reflect-metadata shim is required when using class decorators 
Uncaught TypeError: Cannot read property 'isDefaultChangeDetectionStrategy' of undefined 

CMD

ERROR in multi polyfills

Module not found: Error: Cannot resolve module 'angular2/bundles/angular2-polyfills' in C:\Users\akhilesh.kumar\Desktop\ang17
@ multi polyfills

に、ブラウザのコンソールで、私はfollowigエラーを取得する私のWebPACKのconfigがあります

config.entry = isTest ? {} : { 
    'polyfills': ['es6-shim/es6-shim.js', 'angular2/bundles/angular2-polyfills'], 
    'vendor': './src/vendor.ts', 
    'app': './src/bootstrap.ts' // our angular app 
    }; 

config.module = { 
    preLoaders: isTest ? [] : [{test: /\.ts$/, loader: 'tslint'}], 
    loaders: [......], 
    postLoaders: [], 
    noParse: [/.+zone\.js\/dist\/.+/, /.+angular2\/bundles\/.+/, /angular2-polyfills\.js/] 
    }; 

答えて

2

Angular2 rc1に角polyfillバンドルはありません。 ZoneJSとReflect-metadataの両方を手動で含める必要があります。例えば

<script src="node_modules/zone.js/dist/zone.js"></script> 
<script src="node_modules/reflect-metadata/Reflect.js"></script> 
+0

私はWebPACKのが得意ではないんです。では、これらのコードについてはどうでしょうか。上記のスクリプトを追加した後、これらで何をすべきですか? –

+0

動作していますが、エラーが表示されます。「キャッチされていないエラー:モジュール「angular2/bundles/angular2-polyfills」が見つかりません」 –

関連する問題