Ember cli places js file inside templates dir if i try `ember generate route overview --in-repo app-mgmt`

I have been trying ember engines recently and was using ember cli for generating my routes and controllers. I have created an app called engnTest and created an in-repo-engine 'user-profile' inside. Things were working fine unless i tried generating a route inside user-profile engine. It had generated a overview.js file inside the templates dir.

Ember version used: Ember Octane (3.15.2)

ember generate route overview --in-repo user-profile

Files created:

engnTest/lib/user-profile/app/routes/overview.js

engnTest/lib/user-profile/app/templates/overview.js

engnTest/lib/user-profile/addon/routes/overview.js

engnTest/lib/user-profile/addon/templates/overview.hbs

Someone help me find why this happens ? Why are files generated inside addon ?

Thanks in advance, Mohanapriya C

An ember-engine is an addon for all intents and purposes, so the engine source files should go in addon. So to me it seems weird that it’s putting anything (presumably re-exports) in /app. Seems like it’s using the regular old addon generator and not treating the in repo addon like an engine.

At my company we have 4 in-repo engines and we don’t have /app directories in any of them. Is there anything else in your engine’s /app directory?

That is all i have inside /app directory @dknutsen. Thanks for the clarification :slight_smile: