# Addon is not importing correctly

**URL:** <https://discuss.emberjs.com/t/addon-is-not-importing-correctly/13130>\
**Category:** Ember CLI\
**Created:** [June 17, 2017, 1:03am UTC](https://discuss.emberjs.com/t/addon-is-not-importing-correctly/13130 "2017-06-17T01:03:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skaterdav85](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/skaterdav85/32/18291_2.png) [@skaterdav85](https://discuss.emberjs.com/u/skaterdav85)\
**Post date:** [June 17, 2017, 1:03am UTC](https://discuss.emberjs.com/t/addon-is-not-importing-correctly/13130/1 "2017-06-17T01:03:05Z")

</div>

I’m creating an addon with a mixin. In my consuming app, I import that mixin with `import MyMixin from 'my-addon/mixins/my-mixin';` and log it out to the console, and I get this:

 ![](https://us1.discourse-cdn.com/flex019/uploads/emberjs_public/original/2X/c/ce1f96c3e982916b945413936b6f792e1924e22c.png)

Clearly this isn’t the mixin. This seems to only be a problem in one of my apps. Pushing up my addon to Github and referencing that makes everything work, so I’m pretty sure it is an npm linking issue. Anyone have any ideas what might be wrong?

---

<div class="post-metadata">

**Author:** ![lightblade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/lightblade/32/15632_2.png) [@lightblade](https://discuss.emberjs.com/u/lightblade)\
**Post date:** [June 18, 2017, 6:55pm UTC](https://discuss.emberjs.com/t/addon-is-not-importing-correctly/13130/2 "2017-06-18T18:55:53Z")

</div>

How is the mixin module exported? Code?

---

<div class="post-metadata">

**Author:** ![skaterdav85](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/skaterdav85/32/18291_2.png) [@skaterdav85](https://discuss.emberjs.com/u/skaterdav85)\
**Post date:** [June 19, 2017, 12:23am UTC](https://discuss.emberjs.com/t/addon-is-not-importing-correctly/13130/3 "2017-06-19T00:23:46Z")

</div>

Just the default export. In the addon, I ran `ember g mixin my-mixin`, and from my consuming app, I imported it with `addon-name/mixins/my-mixin`. I looked at other addons and this is how it is done. The problem has to do with my consuming app, because importing the mixin in new ember apps works fine. And in my consuming app, it works fine too when I have my addon downloaded from a remote repo, as opposed to npm linking. It doesn’t work when I use `npm link` in one of my projects, and I am not sure why because `npm link` works fine in a fresh ember project. So it has to do with `npm link` and something not configured properly in my current project. I just don’t know what that is or why, and what to google for.
