-
Notifications
You must be signed in to change notification settings - Fork 34
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
head-browser instance-initializer not found from ember-page-title, booting the app fails (v0.3, fastboot rc3) #34
Comments
@simonihmig have you seen this? |
No, have not used this addon. @vlascik you are using Not sure what's the problem, because |
@simonihmig yes, I'm on 0.3.0, I'm using greenkeeper's PR for ember-page-title for that ember-cli/ember-page-title#72 |
@vlascik In that Greenkeeper PR all tests are passing though!? They would fail if the same initializer issue would come up in CI, wouldn't they? Where do you see the mentioned error happening? |
@simonihmig This only shows up in fastboot, I'm not sure if or how they test for it. |
I think I have found something... In your reproduction repo in the app.js (
So far this should be fine. However the FastBoot instance-initializer (https://github.com/ronco/ember-cli-head/blob/master/fastboot/instance-initializers/head.js), which lives in app-fastboot.js (
So it is overriding the browser initializer`s module, and as it has a different initializer name, there is no "head-browser" initializer anymore. That is in FastBoot, in a browser the override does not happen obviously, so no problems there. These conflicting changes were introduced with the FastBoot 1.0 migrating PRs #21 & #32 (cc @cibernox ) This is a special case, when you use the However this may be an issue other addons might run into as well, especially when migrating away from the @kratiahuja your automatic initializer migration (https://github.com/ember-fastboot/ember-cli-fastboot/blob/master/lib/build-utilities/migrate-initializers.js) might possibly also cause similar problems, as it is changing the module name (removing the "fastboot" subfolder part), and thus possibly causing an existing initializer in |
The migration tool is just moving things around. It's not supposed to touch the files and change content. Ideally addons should be keeping the @simonihmig why not have the same |
@kratiahuja I just wanted to prevent a breaking change because of this. Don't know if ember-page-title is the only addon that would be affected by this? |
At least that's what the code search on ember observer shows |
When using this addon with
ember-page-title
, it requires this addon withbefore: 'head-browser'
inember-page-title\app\instance-initializers\page-title-setup.js
. However, this fails with:While debugging
runInstanceInitializers
parameters I can see head-browser is undefined:page-title-setup-browser { name: 'page-title-setup-browser',
before: 'head-browser',
initialize: [Function: initialize] }
head-browser undefined
Renaming
ember-cli-head\app\instance-initializers\head.js
tohead-browser.js
seems to fix the problem.The text was updated successfully, but these errors were encountered: