信息:
ember-cli: 0.2.5,
ember-cli-less: 1.3.3,
我有下一个错误:
Merge error: file assets/mobile.css.map exists in mobile/tmp/caching-writer-dest-dir_ZcaW3C.tmp and /mobile/tmp/caching-writer-dest-dir_E4iROO.tmp
Pass option { overwrite: true } to mergeTrees in order to have the latter file win.
我尝试了这篇文章中的话,另一篇。但是我仍然没有结果。
感谢您的时间
,因为上一个链接中提到的方法都没有。我选择修改ember-cli-cli-beack:
node_modules/ember-cli-less/node_modules/broccoli-merge-trees/index.js
我更改了行:
function TreeMerger (inputTrees, options) {
if (!(this instanceof TreeMerger)) return new TreeMerger(inputTrees, options)
if (!Array.isArray(inputTrees)) {
throw new Error('Expected array, got ' + inputTrees)
}
this.inputTrees = inputTrees
this.options = { overwrite: true } // <- This line
}
Mergetrees模块具有overwrite
的选项。
在此处记录:https://github.com/broccolijs/broccoli-merge-trees-trees#options
这是一个示例:
return new MergeTrees([app.toTree(), fonts], { overwrite: true });
如果您使用的是Mac,可以尝试find . -name '.DS_Store' -type f -delete
?
我有一个类似的问题,我能够通过删除重复文件来解决。
错误消息
Build failed.
Merge error: file .DS_Store exists in /Users/ember-proj/tmp/broccoli_merge_trees-input_base_path-qaWJUMIJ.tmp/0 and /Users/ember-proj/ai/tmp/broccoli_merge_trees-input_base_path-qaWJUMIJ.tmp/1
Pass option { overwrite: true } to mergeTrees in order to have the latter file win.
'ember-cli-less': {
mergeTrees: {
overwrite: true
}
}
事情将有效