-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.4.0: Could not find module initializers/ember-engines-router-service #67
Comments
Hey, @kpfefferle is this error only happening in the test environment? Could you please provide a minimal reproduction then I can help more 😄 since we didn't those issues in our tests with the dummy app |
@villander We get the same error at runtime in local development when trying to access any route that uses the engine, so this is not an issue isolated to the test environment. I'll try and poke at this further later today. |
I'm having the exact same issue here: projectcaluma/ember-caluma#2001 |
the root cause of the problem I believe is that initializer file export { default } from "ember-engines-router-service/initializers/ember-engines-router-service.js"; and it should be export { default } from "ember-engines-router-service/initializers/ember-engines-router-service"; The simplest solution I see - bump now trying this in our app to confirm this is 1. the actual root cause and 2. proposed change makes the trick |
@kpfefferle @anehx @villander FYI made a PR #73 EDIT: I may be wrong about the root cause, keep looking... |
@SergeAstapov I just checked out your branch and used that build for my use case. Sadly, it didn't work.. However, if I put I also tried replacing the content of the initializer reexport to import initializer from "ember-engines-router-service/initializers/ember-engines-router-service";
export default initializer which doesn't change the meaning of the code but it worked. I hope that helps.. |
@kpfefferle @anehx would you mind to share how dependency tree looks like in your case and if you use Embroider for the app build or "classic" Ember CLI? there was a discussion on Discord which has similar symptom https://discordapp.com/channels/480462759797063690/568935504288940056/1027599076709126194 |
@SergeAstapov I'm not exactly sure what you mean by dependency tree - what output should I paste? Also, I'm using classic ember without embroider. Since a minimal reproduction might help more than outputs from my specific use case I created one here: https://github.com/anehx/ember-engines-router-service-reproduction, also I added a branch that uses embroider instead of classic ember (it didn't produce the error!): https://github.com/anehx/ember-engines-router-service-reproduction/tree/embroider Hope this helps! Edit: I read the discussion you linked, there seems to be a workaround by adding this package to the dev dependencies of the application, but I don't think this can be the solution to this. Wouldn't this even override the built in ember router service? |
@anehx thank you! Reproduction is always the best! |
@SergeAstapov Our application is also using "classic" ember-cli, not Embroider 👍 |
got some updates here: The issue is: any v2 addon in the engine does not get pulled into build.
@anehx it will be inert in the host app thanks to this check https://github.com/villander/ember-engines-router-service/blob/master/addon/src/-private/engine-ext.js#L8 NOTE: |
@SergeAstapov Thanks for analyzing this issue! Is there an issue for For now, we will stay away from the rather hacky workaround and stay on |
@anehx I wonder if embroider-build/ember-auto-import#512 will fix the issue, but it's blocked with ember-engines/ember-engines#820
from functional perspective, v0.3.0 and v0.4.0 are same. the main and only difference is v2 addon format in the latter version |
Thanks for figuring it out @SergeAstapov let's wait for these fixes and see how it goes. 🤞 |
I'm unsure if the error we are getting is related to this or not, but after updating to Ember 3.28, the router service is the app one. I am guessing the initializer is not running. |
@SergeAstapov any news here regarding your last comment? |
@villander unfortunately I don't have any updates on this issue. Haven't been able to find root cause in |
@RobbieTheWagner could you please create a minimal reproduction with this issue? |
When attempting to use v0.4.0 of this addon, the tests we have in our application that use the engine containing this addon blow up with the following error:
v0.3.0 continues to work as expected. I'm guessing this is something related to the migration to v2 addon format? We are using ember-auto-import v2 so v2 addons should theoretically work 🤔
The text was updated successfully, but these errors were encountered: