broccolijs / broccoli-funnel

MIT License
66 stars 37 forks source link

Run time error: Merge error: file already exists, pass option { overwrite: true } #109

Closed yringler closed 5 years ago

yringler commented 5 years ago

I set up funnel in ember-cli-build.js to copy a translations file into dist. It worked, but after I left to another git branch and came back, the builds fail with the following error;

Merge error: file translations/en-us.json exists in C:\Users\john.doe\AppData\Local\Temp\broccoli-19700SykRagiBUk5I\out-272-broccoli_merge_trees_application_dist and C:\Users\john.doe\AppData\Local\Temp\broccoli-19700SykRagiBUk5I\out-274-funnel Pass option { overwrite: true } to mergeTrees in order to have the latter file win.

Here is the relevant code:

    const extraAssets = new Funnel('translations', {
        destDir: '/translations'
    });

    return app.toTree(extraAssets);
yringler commented 5 years ago

As per docs, I put files in /public folder, and ember copies them over itself.