admin管理员组文章数量:1395885
I recently updated an ember-cli
project from 0.0.44
to 0.1.1
and all of the sudden my templates are not loading anymore, instead I get the following warnings on the console:
Could not find "application" template or view. Nothing will be rendered Object {fullName: "template:application"}
Could not find "index" template or view. Nothing will be rendered Object {fullName: "template:index"}
The steps I took to update the project was just:
npm install --save-dev ember-cli
ember init
this is my router:
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('login');
this.route('permission');
this.route('user');
this.route('room');
this.route('room/new');
});
Router.reopen({
notifyGoogleAnalytics: function() {
return window.ga('send', 'pageview', {
'page': this.get('url'),
'title': this.get('url')
});
}.on('didTransition')
});
export default Router;
this is my app.js
:
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';
Ember.MODEL_FACTORY_INJECTIONS = true;
var App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
autoprefixer: {
browsers: ['> 1%', 'last 1 version', 'android 4', 'ios 6']
},
podModulePrefix: config.podModulePrefix,
Resolver: Resolver
});
loadInitializers(App, config.modulePrefix);
export default App;
any help?
I recently updated an ember-cli
project from 0.0.44
to 0.1.1
and all of the sudden my templates are not loading anymore, instead I get the following warnings on the console:
Could not find "application" template or view. Nothing will be rendered Object {fullName: "template:application"}
Could not find "index" template or view. Nothing will be rendered Object {fullName: "template:index"}
The steps I took to update the project was just:
npm install --save-dev ember-cli
ember init
this is my router:
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('login');
this.route('permission');
this.route('user');
this.route('room');
this.route('room/new');
});
Router.reopen({
notifyGoogleAnalytics: function() {
return window.ga('send', 'pageview', {
'page': this.get('url'),
'title': this.get('url')
});
}.on('didTransition')
});
export default Router;
this is my app.js
:
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';
Ember.MODEL_FACTORY_INJECTIONS = true;
var App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
autoprefixer: {
browsers: ['> 1%', 'last 1 version', 'android 4', 'ios 6']
},
podModulePrefix: config.podModulePrefix,
Resolver: Resolver
});
loadInitializers(App, config.modulePrefix);
export default App;
any help?
Share Improve this question edited Oct 10, 2014 at 3:58 Gustavo Siqueira asked Oct 9, 2014 at 19:20 Gustavo SiqueiraGustavo Siqueira 8621 gold badge9 silver badges27 bronze badges 5- @undefined its obviously because that thing isnt in that place – mistahenry Commented Oct 9, 2014 at 19:41
- I tested with a fresh install from 0.0.44 and updated to 0.1.1 and it worked, so I'll just pare both and see what is out of place – Gustavo Siqueira Commented Oct 9, 2014 at 19:52
- what is the route application.index ? what directory are your templates in, can u provide all the information :) – Billybonks Commented Oct 10, 2014 at 2:49
-
I added my
route.js
file to the question, and my templates are inapp/templates/
, all named with .hbs, bothapplication.hbs
andindex.hbs
are there. – Gustavo Siqueira Commented Oct 10, 2014 at 4:00 -
and I'm using
ember-simple-auth
as well – Gustavo Siqueira Commented Oct 10, 2014 at 4:02
2 Answers
Reset to default 13This should help:
npm cache clear
bower cache clean
rm -rf dist tmp bower_ponents node_modules
npm install
bower install
Well I have to say that I tried @quaertym solution and it brought me a lot of problems. For other people it might help that this mand:
rm -rf dist tmp bower_ponents node_modules
works great in OSX and Linux but as the documentation says https://ember-cli./user-guide/#upgrading:
For Windows, use this mand.
rd /s /q node_modules bower_ponents dist tmp
本文标签:
版权声明:本文标题:javascript - Could not find "application" template or view. Nothing will be rendered Object {fullName: &qu 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744088270a2588940.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论