Today I Learned

In-repo addon problem with imports from RFC#176

Symptoms:

I was moving a component from base application (Ember 3.3) to in-repo addon.

It uses import from #RFC176:

import { computed } from '@ember/object';

That caused the following error:

Uncaught Error: Could not find module "@ember/object" imported from "in-repo-addon/components/component-name"

Solution:

I had to make sure than in my in-repo addon package.json had the following dependency:

{
  "name": "in-repo addon name",
  "keywords": [
    "ember-addon"
  ],
  "dependencies": {
    "ember-cli-babel": "*"
  }
}

That’s it :)