Hi I have an existing Ember app which uses Ember 3.24. I have successfully uodated the application to version 3.28 but the upgrade to version 4.0 leads to a bunch of errors and the application is not working anymore. Furthermore we have ember add ons which are also outdated and I have no idea on how to upgrade these addons. Any help recommendation is appreciated
I would start by updating forwards compatible addons first and then attempt the Ember upgrade.
Have you cleared all of the deprecation warnings that apply to 4.x first? That’s the stage we’re still at and we made the mistake of hiding some of them with deprecation-workflow instead of fixing them so there’s quite a backlog.
Also on 3.28 with you folks, with a 1M+ line suite of ember apps + internal addon. One of the nastiest deprecations we have to deal with is removing use of ember-data lifecycle events - we’re down to one, at least.
After that is dealing with the implicit reopen of Component via ember-component-css
. It’s a lot of work to either denamespace our CSS (so we can turn off the patching), or go through and modify components or templates to have an explicit call to get the pod names and set the style namespace. The alternative is to totally change how we do CSS, which isn’t a bad idea but is similarly huge effort.
Just last week I finally got our jquery-integration
flags set to false – the undocumented effect of that change (in addition to all the documented ones) is that EmberData will start using ember-fetch
for requests instead of ember-ajax
, so we had no idea why our network calls were failing to have credentials, etc.
If you post a list of addons you’re using, folks can at least offer some alternatives, if there isn’t a 4.0 compatible version of it.
Are you at least able to use node 16? (Still stuck on 14 thanks to the loss of fibers impacting our selenium automation.)
@Marco_Musolf If you haven’t yet, I encourage you to read/watch In 1 Year.
The key is to come up with small steps. As for the human factor, set realistic expectations—time-wise—for yourself and others; I’d have an honest talk about why the update became difficult (what will you do differently from now on?) and avoid setting an arbitrary deadline (it’s difficult to know what the blockers are until they appear).
Regarding updating addons, it helps to have prior experience with creating or maintaining them. If not, you might try to find open-sourced addons that are simple and up-to-date, and learn how their maintainers have updated their projects. Here’s an addon that I maintain: ember-container-query
.
There can be a fair few tricky changes in interactions that change between 3.28 and 4. Most notably is implicit this in templates as many old addons will still use it and that will cause render errors. Also ember-data changes mean that often if you are deleting a record but you havent unassigned it to this
, this can often cause render errors to avoid recomputing loops.
It can hard give more specifics without having a good look through the code base, but i have done 3 → 4 upgrades for many companies if you are in need of guidance in a consulting capacity.
@tehhowch I migrated from ember-component-css
to ember-cli-styles
to avoid that deprecation. I’m on 5.8 now so all is working fine with it. Check it out - GitHub - webark/ember-cli-styles.