2017-03-18 4 views
0

저는이 https://github.com/damirkusar/AngularMeetsNetCore/tree/AngularRc4 프로젝트에서 Angular 4 RC.4와 .net core를 사용합니다.각도 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에 타이프 스크립트; 다른 사람들이 있을지도 모른다. 이렇게하면 다른 질문에서도 문제가 해결 될 수 있습니다. –

+0

안녕하세요 @ R. 리차드, 힌트를 주셔서 감사합니다,하지만 이것은 문제를 해결하지 못했습니다. 업데이트 된 패키지가 체크인되었습니다. – damir

+0

예, 모두 업데이트했습니다. :) 오류는 여전히 동일합니까? 거기에 변화가 없습니까? –

답변

2

문제는 라인 (13)에 의한 파일 boot-client.ts 하였다

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

제거 platform.destroy(); 그것은 다시 일하기 시작했습니다. 따라서이 줄은 다음과 같아야합니다.

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