找不到“”;应用程序“;模板或视图.对象{fullName:“template:application”}将不呈现任何内
Could not find "application" template or view. Nothing will be rendered Object {fullName: "template:application"}
我最近将一个ember-cli
项目从0.0.44
更新为0.1.1
,突然之间我的模板不再加载,而是在控制台上收到以下警告:
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"}
我更新项目的步骤只是:
npm install --save-dev ember-cli
ember init
这是我的路由器:
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;
这是我的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;
有什么帮助吗?
这应该会有所帮助:
npm cache clear
bower cache clean
rm -rf dist tmp bower_components node_modules
npm install
bower install
我不得不说,我尝试了@quaertym解决方案,它给我带来了很多问题。对于其他人来说,这个命令可能会有所帮助:
rm -rf dist tmp bower_components node_modules
在OSX和Linux中运行良好,但正如文档所说https://ember-cli.com/user-guide/#upgrading:
对于Windows,请使用此命令。
rd /s /q node_modules bower_components dist tmp
相关文章:
- Advantages to DOMParser vs template & innerHTML
- Angular 2 Template syntax
- 使用application/x-www-form-urlencoded使用node.js在post请求中发送数组
- 很棒的共享按钮application.coffee文件在哪里
- Template.subscriptionReady和语义UI Accordion模块
- $(e.target).find和template.find('input').value之间有什么区别
- 未调用Meteor Template onRendered回调
- Template.foo.renderd适用于所有'foo'
- 如何在 template.find(input:hidden[id='SOME VARIABLE']) 声明中使用动态
- text/template和text/plain之间有什么不同
- 如何使用template.find()来选中或不选中复选框
- template.find().val给了我未定义的值
- 如何访问Meteor中nvd3的Template.rendered中的订阅
- 通过服务工作者提供OpenSearch“application/x-建议+json”
- 如何使用Meteor.js中的Template辅助对象迭代对象中的两个数组
- Django Template+JavaScript:如何将Django模板url与JavaScript变量连接起来
- jscroll pane in web application
- 从Kendo中的columns.filterable.cell.template函数访问列字段名
- caching issue with web application developed using reactjs &
- 找不到“”;应用程序“;模板或视图.对象{fullName:“template:application”}将不呈现任何内