2017-03-18 17 views
0

私はこの角度範囲4 RC.4と.net coreを使用するこのhttps://github.com/damirkusar/AngularMeetsNetCore/tree/AngularRc4プロジェクトを持っています。ファイルを更新し、アプリが熱いモジュール交換を通じてリフレッシュすると、私は次のエラーを取得する:手動でアプリをリフレッシュすると角度4 RC.4&.net coreセレクタ "app"と要素が一致しません

Unhandled Promise rejection: The selector "app" did not match any elements ; Zone: <root> ; Task: Promise.then ; Value: ZoneAwareError__zone_symbol__error: Error: The selector "app" did not match any elements 
    at DefaultDomRenderer2.selectRootElement (http://localhost:61234/dist/vendor.js:24029:19) [angular] 
    at DebugRenderer2.selectRootElement (http://localhost:61234/dist/vendor.js:12878:49) [angular] 
    at createElement (http://localhost:61234/dist/vendor.js:9171:23) [angular] 
    at createViewNodes (http://localhost:61234/dist/vendor.js:11672:44) [angular] 
    at createRootView (http://localhost:61234/dist/vendor.js:11619:5) [angular] 
    at callWithDebugContext (http://localhost:61234/dist/vendor.js:12727:42) [angular] 
    at Object.debugCreateRootView [as createRootView] (http://localhost:61234/dist/vendor.js:12204:12) [angular] 
    at ComponentFactory_.create (http://localhost:61234/dist/vendor.js:9591:46) [angular] 
    at ComponentFactoryBoundToModule.create (http://localhost:61234/dist/vendor.js:3490:29) [angular] 
    at ApplicationRef_.bootstrap (http://localhost:61234/dist/vendor.js:5024:57) [angular] 
    at http://localhost:61234/dist/vendor.js:4811:79 [angular] 
    at Array.forEach (native) [angular] 
    at PlatformRef_._moduleDoBootstrap (http://localhost:61234/dist/vendor.js:4811:42) [angular] 
    at http://localhost:61234/dist/vendor.js:4772:27 [angular]__zone_symbol__message: "The selector "app" did not match any elements"__zone_symbol__stack: "Error: The selector "app" did not match any elements↵ at DefaultDomRenderer2.selectRootElement (http://localhost:61234/dist/vendor.js:24029:19) [angular]↵ at DebugRenderer2.selectRootElement (http://localhost:61234/dist/vendor.js:12878:49) [angular]↵ at createElement (http://localhost:61234/dist/vendor.js:9171:23) [angular]↵ at createViewNodes (http://localhost:61234/dist/vendor.js:11672:44) [angular]↵ at createRootView (http://localhost:61234/dist/vendor.js:11619:5) [angular]↵ at callWithDebugContext (http://localhost:61234/dist/vendor.js:12727:42) [angular]↵ at Object.debugCreateRootView [as createRootView] (http://localhost:61234/dist/vendor.js:12204:12) [angular]↵ at ComponentFactory_.create (http://localhost:61234/dist/vendor.js:9591:46) [angular]↵ at ComponentFactoryBoundToModule.create (http://localhost:61234/dist/vendor.js:3490:29) [angular]↵ at ApplicationRef_.bootstrap (http://localhost:61234/dist/vendor.js:5024:57) [angular]↵ at http://localhost:61234/dist/vendor.js:4811:79 [angular]↵ at Array.forEach (native) [angular]↵ at PlatformRef_._moduleDoBootstrap (http://localhost:61234/dist/vendor.js:4811:42) [angular]↵ at http://localhost:61234/dist/vendor.js:4772:27 [angular]"message: (...)name: (...)ngDebugContext: DebugContext_ngErrorLogger:()originalStack: (...)stack: (...)toSource:()toString:()zoneAwareStack: (...)get message:()set message: (value)get name:()set name: (value)get originalStack:()set originalStack: (value)get stack:()set stack: (value)get zoneAwareStack:()set zoneAwareStack: (value)__proto__: Object Error: The selector "app" did not match any elements 
    at DefaultDomRenderer2.selectRootElement (http://localhost:61234/dist/vendor.js:24029:19) [angular] 
    at DebugRenderer2.selectRootElement (http://localhost:61234/dist/vendor.js:12878:49) [angular] 
    at createElement (http://localhost:61234/dist/vendor.js:9171:23) [angular] 
    at createViewNodes (http://localhost:61234/dist/vendor.js:11672:44) [angular] 
    at createRootView (http://localhost:61234/dist/vendor.js:11619:5) [angular] 
    at callWithDebugContext (http://localhost:61234/dist/vendor.js:12727:42) [angular] 
    at Object.debugCreateRootView [as createRootView] (http://localhost:61234/dist/vendor.js:12204:12) [angular] 
    at ComponentFactory_.create (http://localhost:61234/dist/vendor.js:9591:46) [angular] 
    at ComponentFactoryBoundToModule.create (http://localhost:61234/dist/vendor.js:3490:29) [angular] 
    at ApplicationRef_.bootstrap (http://localhost:61234/dist/vendor.js:5024:57) [angular] 
    at http://localhost:61234/dist/vendor.js:4811:79 [angular] 
    at Array.forEach (native) [angular] 
    at PlatformRef_._moduleDoBootstrap (http://localhost:61234/dist/vendor.js:4811:42) [angular] 
    at http://localhost:61234/dist/vendor.js:4772:27 [angular] 
consoleError @ vendor.js:100206 

、それが正しくロードされ、更新されます。

誰も問題が何であるか、私は何を変えなければならないのか分かりますか? ありがとうございます。

+0

あなたのpackage.jsonを通過し、あなたの依存関係が正しい(最新)のバージョンであることを確認することがあります。具体的には、zone.jsを0.8.4に設定します。 2.2.1へのtypescript;他にもあります。これにより、あなたの他の質問にも問題が解決する可能性があります。 –

+0

こんにちはR.リチャーズ、ヒントのおかげで、これは問題を解決していませんでした。更新されたパッケージがチェックインされています。 – damir

+0

うん、すべて更新しました。 :)エラーはまだ同じですか?そこに変更はありませんか? –

答えて

2

問題は、ライン13上boot-client.tsファイルで発生した

module['hot'].dispose(() => { platform.destroy(); }); 

除去platform.destroy()。それは再び働き始めた。だから、この行は次のようになります。

module['hot'].dispose(() => { }); 
関連する問題