[英]Ember build failed because of broccoliBuilderError
我正在執行余燼項目,並且我正在嘗試將余燼版本從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();
};
有什么建議解決這個問題嗎?
這是從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左右從bower切換到npm,但是使ember> 3.0
的唯一方法是通過npm,因為上一個bower pushed版本是2.x
的結尾。
我懷疑您使用的是ember-cli
的舊版本,由於未找到ember
,因此也需要更新。 您正在使用哪個版本的ember-cli
?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.