我正在执行余烬项目,并且我正在尝试将余烬版本从2.8升级到3.5.0。但是由于我更改了版本以及一些依赖项版本,所以出现此错误:
我尝试使用ember-cli-build文件修复此问题,但错误仍然存在。
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
const isPublicEnv = EmberApp.env() === 'public';
const app = new EmberApp(defaults, {
'sassOptions': {
includePaths: [
'bower_components/materialize/sass',
],
},
'outputPaths': {
app: {
css: {
design1: '/assets/design1.css',
design2: '/assets/design2.css'
},
},
},
'ember-cli-babel': {
includePolyfill: true,
},
'minifyJS': {
enabled: isPublicEnv,
},
'minifyCSS': {
enabled: isPublicEnv,
},
'fingerprint': {
enabled: isPublicEnv,
},
'tests': !isPublicEnv,
'hinting': !isPublicEnv,
'sourcemaps': {
enabled: !isPublicEnv,
},
});
app.import('vendor/lib1.js');
app.import('vendor/lib2.js');
return app.toTree();
};
是否有解决此问题的建议?
答案 0 :(得分:1)
这是从ember-cli-htmlbars-inline-precompile开始的堆栈跟踪中失败的代码:
templateCompilerPath() {
let config = this.projectConfig();
let templateCompilerPath = config['ember-cli-htmlbars'] && config['ember-cli-htmlbars'].templateCompilerPath;
let ember = this.project.findAddonByName('ember-source');
if (ember) {
return ember.absolutePaths.templateCompiler;
}
return path.resolve(this.project.root, templateCompilerPath);
}
此行let ember = this.project.findAddonByName('ember-source');
必须是罪魁祸首。尽管Ember在2.11
iirc周围从凉亭切换到npm,但是唯一可以通过Epm> 3.0
获得Ember> 2.x
的方法是,因为上一个凉亭推送版本是ember-cli
的结尾。 >
我怀疑您使用的是ember
的旧版本,因为找不到ember-cli
,因此也需要更新。您正在使用哪个版本的php bin/console cache:clear
?