4

信息:

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.

我尝试了这篇文章和其他文章中所说的内容。但是我还是没有结果。

谢谢你的时间

4

4 回答 4

2

由于前面的链接中提到的方法都不起作用。我选择修改 ember-cli-less 包:

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
}
于 2015-05-19T14:02:45.290 回答
1

mergeTrees 模块有一个选项用于overwrite.

它记录在这里:https ://github.com/broccolijs/broccoli-merge-trees#options

这是一个例子:

return new MergeTrees([app.toTree(), fonts], { overwrite: true });
于 2015-10-13T14:21:22.093 回答
1

如果你使用的是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.
于 2017-01-05T00:07:57.233 回答
0

将 ember-cli-less 更新到最新版本(现在是 1.5.3),然后像这样传递配置。

'ember-cli-less': {
  mergeTrees: {
    overwrite: true
  }
}

事情会奏效

于 2016-03-21T07:59:06.507 回答