# Linked Addons causing build errors in consuming app relates to babel-core

**URL:** <https://discuss.emberjs.com/t/linked-addons-causing-build-errors-in-consuming-app-relates-to-babel-core/16977>\
**Category:** Ember CLI\
**Created:** [August 19, 2019, 7:38am UTC](https://discuss.emberjs.com/t/linked-addons-causing-build-errors-in-consuming-app-relates-to-babel-core/16977 "2019-08-19T07:38:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alonski](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alonski/32/12542_2.png) [@Alonski](https://discuss.emberjs.com/u/Alonski)\
**Post date:** [August 19, 2019, 7:38am UTC](https://discuss.emberjs.com/t/linked-addons-causing-build-errors-in-consuming-app-relates-to-babel-core/16977/1 "2019-08-19T07:38:59Z")

</div>

I have been having issues using updated dependencies inside an addon that is linked to another app. For example this seems to throw because the addon has `ember-cookies: 0.4` and a dependency. Steps:

1. The addon and app have version `ember-cookies: 0.4` set as a dependency.
2. Inside the addon I `yarn link`
3. Inside the app I `yarn link addon`
4. I `ember s` in the app and get this error:

```auto
Build Error (broccoli-persistent-filter:Babel > [Babel: ember-cookies]) in ember-cookies/clear-all-cookies.js

Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.

```

This doesn’t only happen with `ember-cookies`. I ended up downgrading `ember-cookies` and it seemed to fix the issue for a while until another addon started causing this issue. Sometimes deleting `node_modules` fixes this until `yarn install` installs something new.

What I think is happening is that another addon/dependency has Babel 6 declared as a dependency. This is causing the build to sometimes load Babel 6 and not Babel 7.

Any ideas what can be done?

---

<div class="post-metadata">

**Author:** ![arun\_raj](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/arun_raj/32/16935_2.png) [@arun\_raj](https://discuss.emberjs.com/u/arun_raj)\
**Post date:** [February 27, 2020, 4:53pm UTC](https://discuss.emberjs.com/t/linked-addons-causing-build-errors-in-consuming-app-relates-to-babel-core/16977/2 "2020-02-27T16:53:33Z")

</div>

Hi Alonski, I too facing similar issue. Did you find any solution?

---

<div class="post-metadata">

**Author:** ![ef4](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ef4/32/13470_2.png) [@ef4](https://discuss.emberjs.com/u/ef4)\
**Post date:** [February 28, 2020, 2:54pm UTC](https://discuss.emberjs.com/t/linked-addons-causing-build-errors-in-consuming-app-relates-to-babel-core/16977/3 "2020-02-28T14:54:48Z")

</div>

I think this is an NPM bug (and yarn has copied the bug for compatibility). When they do package hoisting optimization, they sometimes break the stated peerDependency requirements of some packages.

If you go crawling through node\_modules you’ll probably find some package is able to resolve a version of a peer dependency that doesn’t meet its stated requirement.
