# In-repo Addon Not found

**URL:** <https://discuss.emberjs.com/t/in-repo-addon-not-found/14437>\
**Category:** Ember CLI\
**Created:** [March 23, 2018, 4:31pm UTC](https://discuss.emberjs.com/t/in-repo-addon-not-found/14437 "2018-03-23T16:31:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdbiscan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mdbiscan/32/15616_2.png) [@mdbiscan](https://discuss.emberjs.com/u/mdbiscan)\
**Post date:** [March 23, 2018, 4:31pm UTC](https://discuss.emberjs.com/t/in-repo-addon-not-found/14437/1 "2018-03-23T16:31:36Z")

</div>

I’m trying to import an in-repo addon in my project. It builds an object and exports it in `lib/myaddon/addon/index.js`.

`lib/myaddon/index.js`:

```auto
var fs = require('fs');

var options = {};

fs.readdirSync('lib/myaddon/options').forEach(function(file) {
  var option = require('./options/' + file);
  options[option.key] = option.value;
});

var wstream = fs.createWriteStream('lib/myaddon/addon/index.js');

wstream.on('finish', function() {
  console.log(' Options file written.')
});

wstream.write('export default JSON.parse(')
wstream.write(JSON.stringify(options));
wstream.write(');');
wstream.end();

module.exports = {
  name: 'myaddon',

  isDevelopingAddon: function() {
    return true;
  }
};

```

`/lib/myaddon/addon/index.js`:

```auto
export default { /* the object */ }

```

where it’s imported:

```auto
import MyAddon from 'myaddon';

```

Console output: `loader.js:219 Uncaught Error: Could not find module 'myaddon' imported from 'the-file-using-the-import'`

App `package.json`:

```auto
  "ember-addon": {
    "paths": [
      "lib/myaddon"
    ]
  }

```

Addon `package.json`:

```auto
{
  "name": "myaddon",
  "keywords": [
    "ember-addon",
    "myaddon"
  ],
  "dependencies": {}
}

```

---

<div class="post-metadata">

**Author:** ![mdbiscan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mdbiscan/32/15616_2.png) [@mdbiscan](https://discuss.emberjs.com/u/mdbiscan)\
**Post date:** [March 23, 2018, 6:53pm UTC](https://discuss.emberjs.com/t/in-repo-addon-not-found/14437/2 "2018-03-23T18:53:30Z")

</div>

Digging into the `loader.js` `findModule`. On the `module.exports` object, my plugin is not found. That’s obvious from the console error.

I guess my question is, shouldn’t the export of the addon from its index file add it to the list of exports? I don’t see anything special in regards to this looking at other addons.

I decided to try another in-repo addon, but without anything special, just exporting a static object. The issue persists.

---

<div class="post-metadata">

**Author:** ![mdbiscan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mdbiscan/32/15616_2.png) [@mdbiscan](https://discuss.emberjs.com/u/mdbiscan)\
**Post date:** [March 23, 2018, 8:22pm UTC](https://discuss.emberjs.com/t/in-repo-addon-not-found/14437/3 "2018-03-23T20:22:14Z")

</div>

OK, this now works. I had to rerun `ember serve` for it to pick up. I was running `ember build` to build it.

I’ve asked this question three times in the slack `-help` channel and I’ve seen this question posed before here. The fact that no one answers these questions is really disappointing.
