ember-cli / ember-cli/ember-cli

Unable to override addon re-exports in the consumer application

Open
#5,336 18 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
3.2k
Forks
1.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

[repo](https://github.com/beatle/emcli-templates-collision-repro) with reproduction. This reproduction is based on a dummy app but it's also reproducible within a host app.

Steps to reproduce:

```
$ ember g template test
$ ember g template test --dummy
```

produces following files:
- addon/templates/test.hbs
- app/templates/test.js
- tests/dummy/app/templates/test.hbs
- ...

Now if you run the build it will fail with an `EEXIST` exception:

```
ember build
...
EEXIST, file already exists '/home/beatle/workspace/ember-cli-apps/c/tmp/template_compiler-output_path-beowNp4d.tmp/dummy/templates/test.js'
Error: EEXIST, file already exists '/home/beatle/workspace/ember-cli-apps/c/tmp/template_compiler-output_path-beowNp4d.tmp/dummy/templates/test.js'
at Error (native)
at Object.fs.symlinkSync (fs.js:848:18)
at symlink (/home/beatle/workspace/ember-cli-apps/c/node_modules/symlink-or-copy/index.js:82:14)
at symlinkOrCopySync (/home/beatle/workspace/ember-cli-apps/c/node_modules/symlink-or-copy/index.js:58:5)
at TemplateCompiler.Filter._handleFile (/home/beatle/workspace/ember-cli-apps/c/node_modules/broccoli-persistent-filter/index.js:101:12)
at TemplateCompiler. (/home/beatle/workspace/ember-cli-apps/c/node_modules/broccoli-persistent-filter/index.js:88:21)
at /home/beatle/workspace/ember-cli-apps/c/node_modules/promise-map-series/index.js:11:14
at lib$rsvp$$internal$$tryCatch (/home/beatle/workspace/ember-cli-apps/c/node_modules/rsvp/dist/rsvp.js:493:16)
at lib$rsvp$$internal$$invokeCallback (/home/beatle/workspace/ember-cli-apps/c/node_modules/rsvp/dist/rsvp.js:505:17)
at lib$rsvp$$internal$$publish (/home/beatle/workspace/ember-cli-apps/c/node_modules/rsvp/dist/rsvp.js:476:11)
```

As I can see after some debugging it happens when broccoli tries to save compiled `tests/dummy/app/templates/test.hbs` to the `tests/dummy/app/templates/test.js` where the `app/templates/test.js` is merged already.

A little bit strange but this error happens only on cold starts and works ok on rebuilds.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.