Imports not working in in-repo addons

image

I have created an in-repo addon and then ran the below command to create a component within that in-repo addon. The component was created successfully, however, it seems that the in-repo addon is having trouble importing @ember/component. I have noticed this with other packages in core ember as well in regards to in-repo addons. They are not able to be found by the loader.

ember generate component record-multi-select-autosave --ir record-selects

I did notice that the package.json for in-repo addons is pretty bare. I was wondering whether additional dependencies needed to be added in order to support loading Ember packages in the in-repo addon’s component or something.

I’m guess that somewhere above that error in your console output you might find:

DEPRECATION: Addon files were detected in /path/to/your-app/lib/record-selects/addon, but no JavaScript preprocessors were found for record-selects. Please make sure to add a preprocessor (most likely ember-cli-babel) to in dependencies (NOT devDependencies) in record-selects’s package.json.

But yeah, I think you need to have ember-cli-babel in your addon’s dependencies. Same goes for having ember-cli-htmlbars if your addon contains any templates.