Ember-CLI - 运行默认应用程序时出错

时间:2014-06-23 00:33:11

标签: ember.js ember-cli

尝试运行一个简单的,基于Ember-CLI的简单应用程序,但它在控制台中生成错误:

  

无法找到“索引”模板或视图。什么都不会呈现   对象

试图绕过Ember和Ember-CLI,但我甚至不知道从哪里开始!

来自控制台的完整日志是:

[Log] [ ] router:main ................................................ simple/main/router (vendor.js, line 16672)
[Log] [✓] router:main ................................................ simple/router (vendor.js, line 16672)
[Log] [✓] router:main ................................................ simple/router (vendor.js, line 16672)
[Log] [ ] application:main ........................................... simple/main/application (vendor.js, line 16672)
[Log] [ ] application:main ........................................... simple/application (vendor.js, line 16672)
[Log] [ ] application:main ........................................... simple/applications/main (vendor.js, line 16672)
[Debug] DEBUG: ------------------------------- (vendor.js, line 16672)
[Debug] DEBUG: Ember      : 1.5.1 (vendor.js, line 16672)
[Debug] DEBUG: Ember Data : 1.0.0-beta.8.2a68c63a (vendor.js, line 16672)
[Debug] DEBUG: Handlebars : 1.3.0 (vendor.js, line 16672)
[Debug] DEBUG: jQuery     : 1.11.1 (vendor.js, line 16672)
[Debug] DEBUG: ------------------------------- (vendor.js, line 16672)
[Log] [ ] store:application .......................................... simple/application/store (vendor.js, line 16672)
[Log] [ ] store:application .......................................... undefined (vendor.js, line 16672)
[Log] [ ] store:application .......................................... simple/stores/application (vendor.js, line 16672)
[Log] [ ] store:main ................................................. simple/main/store (vendor.js, line 16672)
[Log] [ ] store:main ................................................. simple/store (vendor.js, line 16672)
[Log] [ ] store:main ................................................. simple/stores/main (vendor.js, line 16672)
[Log] [ ] event_dispatcher:main ...................................... simple/main/event_dispatcher (vendor.js, line 16672)
[Log] [ ] event_dispatcher:main ...................................... simple/event_dispatcher (vendor.js, line 16672)
[Log] [ ] event_dispatcher:main ...................................... simple/event_dispatchers/main (vendor.js, line 16672)
[Log] [ ] router:main ................................................ simple/main/router (vendor.js, line 16672)
[Log] [✓] router:main ................................................ simple/router (vendor.js, line 16672)
[Log] [✓] router:main ................................................ simple/router (vendor.js, line 16672)
[Log] [ ] -location-setting:root-url ................................. simple/root-url/-location-setting (vendor.js, line 16672)
[Log] [ ] -location-setting:root-url ................................. undefined (vendor.js, line 16672)
[Log] [ ] -location-setting:root-url ................................. simple/-location-settings/root-url (vendor.js, line 16672)
[Log] [ ] location:auto .............................................. simple/auto/location (vendor.js, line 16672)
[Log] [ ] location:auto .............................................. undefined (vendor.js, line 16672)
[Log] [ ] location:auto .............................................. simple/locations/auto (vendor.js, line 16672)
[Log] [ ] -location-setting:root-url ................................. simple/root-url/-location-setting (vendor.js, line 16672)
[Log] [ ] -location-setting:root-url ................................. undefined (vendor.js, line 16672)
[Log] [ ] -location-setting:root-url ................................. simple/-location-settings/root-url (vendor.js, line 16672)
[Log] [ ] route:basic ................................................ simple/basic/route (vendor.js, line 16672)
[Log] [ ] route:basic ................................................ undefined (vendor.js, line 16672)
[Log] [ ] route:basic ................................................ simple/routes/basic (vendor.js, line 16672)
[Log] [ ] route:basic ................................................ simple/basic/route (vendor.js, line 16672)
[Log] [ ] route:basic ................................................ undefined (vendor.js, line 16672)
[Log] [ ] route:basic ................................................ simple/routes/basic (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/application/route (vendor.js, line 16672)
[Log] [ ] route:application .......................................... undefined (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/routes/application (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/application/route (vendor.js, line 16672)
[Log] [ ] route:application .......................................... undefined (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/routes/application (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/application/route (vendor.js, line 16672)
[Log] [ ] route:application .......................................... undefined (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/routes/application (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/application/route (vendor.js, line 16672)
[Log] [ ] route:application .......................................... undefined (vendor.js, line 16672)
[Log] [ ] route:application .......................................... simple/routes/application (vendor.js, line 16672)
[Log] generated -> route:application  (vendor.js, line 16672)
Object

[Log] [ ] route:index ................................................ simple/index/route (vendor.js, line 16672)
[Log] [ ] route:index ................................................ undefined (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/routes/index (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/index/route (vendor.js, line 16672)
[Log] [ ] route:index ................................................ undefined (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/routes/index (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/index/route (vendor.js, line 16672)
[Log] [ ] route:index ................................................ undefined (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/routes/index (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/index/route (vendor.js, line 16672)
[Log] [ ] route:index ................................................ undefined (vendor.js, line 16672)
[Log] [ ] route:index ................................................ simple/routes/index (vendor.js, line 16672)
[Log] generated -> route:index  (vendor.js, line 16672)
Object

[Log] [ ] controller:application ..................................... simple/application/controller (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/controllers/application (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/application/controller (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/controllers/application (vendor.js, line 16672)
[Log] [ ] controller:basic ........................................... simple/basic/controller (vendor.js, line 16672)
[Log] [ ] controller:basic ........................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:basic ........................................... simple/controllers/basic (vendor.js, line 16672)
[Log] [ ] controller:basic ........................................... simple/basic/controller (vendor.js, line 16672)
[Log] [ ] controller:basic ........................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:basic ........................................... simple/controllers/basic (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/application/controller (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/controllers/application (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/application/controller (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:application ..................................... simple/controllers/application (vendor.js, line 16672)
[Log] generated -> controller:application  (vendor.js, line 16672)
Object

[Log] [ ] view:application ........................................... simple/application/view (vendor.js, line 16672)
[Log] [ ] view:application ........................................... undefined (vendor.js, line 16672)
[Log] [ ] view:application ........................................... simple/views/application (vendor.js, line 16672)
[Log] [ ] view:application ........................................... simple/application/view (vendor.js, line 16672)
[Log] [ ] view:application ........................................... undefined (vendor.js, line 16672)
[Log] [ ] view:application ........................................... simple/views/application (vendor.js, line 16672)
[Log] [ ] template:application ....................................... simple/application/template (vendor.js, line 16672)
[Log] [ ] template:application ....................................... simple/templates/application (vendor.js, line 16672)
[Log] [✓] template:application ....................................... simple/templates/application (vendor.js, line 16672)
[Log] [✓] template:application ....................................... simple/templates/application (vendor.js, line 16672)
[Log] [ ] view:toplevel .............................................. simple/toplevel/view (vendor.js, line 16672)
[Log] [ ] view:toplevel .............................................. undefined (vendor.js, line 16672)
[Log] [ ] view:toplevel .............................................. simple/views/toplevel (vendor.js, line 16672)
[Log] [ ] view:toplevel .............................................. simple/toplevel/view (vendor.js, line 16672)
[Log] [ ] view:toplevel .............................................. undefined (vendor.js, line 16672)
[Log] [ ] view:toplevel .............................................. simple/views/toplevel (vendor.js, line 16672)
[Log] Rendering application with default view <simple@view:toplevel::ember277>  (vendor.js, line 16672)
Object

[Log] [ ] controller:index ........................................... simple/index/controller (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/controllers/index (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/index/controller (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/controllers/index (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/index/controller (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/controllers/index (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/index/controller (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... undefined (vendor.js, line 16672)
[Log] [ ] controller:index ........................................... simple/controllers/index (vendor.js, line 16672)
[Log] generated -> controller:index  (vendor.js, line 16672)
Object

[Log] [ ] view:index ................................................. simple/index/view (vendor.js, line 16672)
[Log] [ ] view:index ................................................. undefined (vendor.js, line 16672)
[Log] [ ] view:index ................................................. simple/views/index (vendor.js, line 16672)
[Log] [ ] view:index ................................................. simple/index/view (vendor.js, line 16672)
[Log] [ ] view:index ................................................. undefined (vendor.js, line 16672)
[Log] [ ] view:index ................................................. simple/views/index (vendor.js, line 16672)
[Log] [ ] template:index ............................................. simple/index/template (vendor.js, line 16672)
[Log] [ ] template:index ............................................. undefined (vendor.js, line 16672)
[Log] [ ] template:index ............................................. simple/templates/index (vendor.js, line 16672)
[Log] [ ] template:index ............................................. simple/index/template (vendor.js, line 16672)
[Log] [ ] template:index ............................................. undefined (vendor.js, line 16672)
[Log] [ ] template:index ............................................. simple/templates/index (vendor.js, line 16672)
[Log] Could not find "index" template or view. Nothing will be rendered  (vendor.js, line 16672)
Object

1 个答案:

答案 0 :(得分:3)

这不是错误,它只是一个信息日志:https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/resolver.js#L368-L380

Ember正在告诉你它寻找的对象以及找到的对象。并非所有对象都需要实现,具体取决于您尝试获得的效果。