# Ember Octane generate component -gc errors 3.17.1

**URL:** <https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702>\
**Category:** Ember CLI\
**Created:** [March 31, 2020, 1:17am UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702 "2020-03-31T01:17:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![StuartGuthrie](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/stuartguthrie/32/17520_2.png) [@StuartGuthrie](https://discuss.emberjs.com/u/StuartGuthrie)\
**Post date:** [March 31, 2020, 1:17am UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/1 "2020-03-31T01:17:37Z")

</div>

Hi there,

I’m trying to generate new octane components js and hbs.

I do this: ember g component foo -gc

It works in terms of adding them both to app/components/foo.js  
app/components/foo.hbs

However, if I then ember serve, I get this:

(node:10255) UnhandledPromiseRejectionWarning: Error: EEXIST: file already exists, symlink ‘/home/username/workspace/polonious-dash/app/components/foo.js’ → ‘/tmp/broccoli-10255PQnTimmXLkvP/out-544-broccoli\_persistent\_filter\_template\_compiler/polonious-dash/components/foo.js’ at Object.symlinkSync (fs.js:1011:3) at symlink (/home/username/workspace/polonious-dash/node\_modules/symlink-or-copy/index.js:98:14) at symlinkOrCopySync (/home/username/workspace/polonious-dash/node\_modules/symlink-or-copy/index.js:65:5) at /home/username/workspace/polonious-dash/node\_modules/ember-cli-htmlbars/node\_modules/broccoli-persistent-filter/index.js:322:16 at initializePromise (/home/username/workspace/polonious-dash/node\_modules/ember-cli-htmlbars/node\_modules/rsvp/dist/rsvp.js:523:7) at new Promise (/home/username/workspace/polonious-dash/node\_modules/ember-cli-htmlbars/node\_modules/rsvp/dist/rsvp.js:1017:35) at TemplateCompiler.Filter.\_handleFile (/home/username/workspace/polonious-dash/node\_modules/ember-cli-htmlbars/node\_modules/broccoli-persistent-filter/index.js:306:10)

… etc

I can get rid of this error by mv app/components/foo.hbs app/template/components/.

ember s then works ok.

Is there some switch I’m missing in package.json or one of the other ember config files that controls this behaviour, it feels like I’m half way there but broccoli is not happy…

> ember -v ember-cli: 3.16.0 node: 12.16.1 (I’ve also tried 13.\*) os: linux x64

hopefully relevant package.json bits:

“devDependencies”: { “@ember/optional-features”: “^1.3.0”, “ember-source”: “3.17.1”, },

“ember”: { “edition”: “octane” }

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [March 31, 2020, 2:07am UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/2 "2020-03-31T02:07:32Z")

</div>

The main requirements for colocation are:

- ember-cli \>= 3.12.0
- ember-source \>= 3.13.0
- ember-cli-htmlbars \>= 4.2.0

The specific error you are seeing _seems_ like one of these packages is not quite up to the requirements here.

---

<div class="post-metadata">

**Author:** ![webark](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/webark/32/17126_2.png) [@webark](https://discuss.emberjs.com/u/webark)\
**Post date:** [July 23, 2020, 6:51pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/3 "2020-07-23T18:51:00Z")

</div>

If you have a colocated component in a test dummy app, is there a strait forward way to only include that in apps that are above ember 3.12?

---

<div class="post-metadata">

**Author:** ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)\
**Post date:** [July 25, 2020, 2:44am UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/4 "2020-07-25T02:44:55Z")

</div>

What do you mean by “in a test dummy app”?

---

<div class="post-metadata">

**Author:** ![webark](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/webark/32/17126_2.png) [@webark](https://discuss.emberjs.com/u/webark)\
**Post date:** [July 25, 2020, 4:30am UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/5 "2020-07-25T04:30:55Z")

</div>

Like in

`tests/dummy/app/components/my-component.{js,hbs}`

---

<div class="post-metadata">

**Author:** ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)\
**Post date:** [July 25, 2020, 8:12pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/6 "2020-07-25T20:12:40Z")

</div>

Anything in an addon’s dummy app is ignored when building the addon for inclusion in a consuming app, so there’s no way I’m aware of to use stuff from it. The component in question should probably be added to the addon where it could be included in the addon build conditionally (or always of course).

---

<div class="post-metadata">

**Author:** ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)\
**Post date:** [July 25, 2020, 8:15pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/7 "2020-07-25T20:15:22Z")

</div>

And if you wanted to use code from an addon differently depending on the version of the host app I think you can use [GitHub - ember-cli/ember-cli-version-checker: Dependency version checker for Ember CLI addons](https://github.com/ember-cli/ember-cli-version-checker)

---

<div class="post-metadata">

**Author:** ![webark](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/webark/32/17126_2.png) [@webark](https://discuss.emberjs.com/u/webark)\
**Post date:** [July 25, 2020, 9:04pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/8 "2020-07-25T21:04:08Z")

</div>

Sure. I was including it in a acceptance test to ensure they where supported. So not concerned with consuming apps, just wanted to run a test against it.

---

<div class="post-metadata">

**Author:** ![webark](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/webark/32/17126_2.png) [@webark](https://discuss.emberjs.com/u/webark)\
**Post date:** [July 25, 2020, 9:05pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/9 "2020-07-25T21:05:19Z")

</div>

Yea, the addon code supports both, but if you have a colocated component in your test dummy app, it will fail the tests in less then 3.12

---

<div class="post-metadata">

**Author:** ![webark](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/webark/32/17126_2.png) [@webark](https://discuss.emberjs.com/u/webark)\
**Post date:** [July 25, 2020, 9:07pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/10 "2020-07-25T21:07:49Z")

</div>

I can just not include ember 3.12 in the ember try set, but was wondering if there was a strait forward way to either skip it or handle them without modifying the addon code

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [July 27, 2020, 1:34pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/11 "2020-07-27T13:34:32Z")

</div>

> [@webark](#):
>
> If you have a colocated component in a test dummy app, is there a strait forward way to only include that in apps that are above ember 3.12?

No, not really. The closest I’ve come is what I did here:

> <https://github.com/ember-cli/ember-cli-htmlbars/pull/309>
>
> Fix #307 
> 
> TODO:
> 
> \- \[x\] Ensure \`env.moduleName\` is threaded through (need ht…tps://github.com/ember-cli/ember-cli-htmlbars/pull/310)
> \- \[x\] Add tests ensuring we do not regress

It basically sets up some additional trees that conditionally get merged into the dummy app only when on octane.

---

<div class="post-metadata">

**Author:** ![webark](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/webark/32/17126_2.png) [@webark](https://discuss.emberjs.com/u/webark)\
**Post date:** [July 27, 2020, 2:39pm UTC](https://discuss.emberjs.com/t/ember-octane-generate-component-gc-errors-3-17-1/17702/12 "2020-07-27T14:39:30Z")

</div>

Yea, ok. Forgot about the ember-cli-build file. I didn’t want it to be in the addon code. I thought about putting it in an a test addon and doing basically the same things Ok cool. Thanks! @rwjblue and @dknutsen
