First, you have to know which Meteor model you’re working in your undertaking. The best method is to run
meteor --version inside your undertaking folder.
In the event you run this command outdoors of your undertaking folder, it’s going to present the Meteor model that’s put in in your machine.
I like to recommend you to observe the Changelog web page on Meteor documentation. It is going to assist you to perceive higher what adjustments from one model to a different.
The command to replace is simple:
meteor replace —launch METEOR@<version-number-goes-here> and I actually advocate that you simply replace step-by-step, not skipping any variations. For example: in case you are utilizing model v1.8, you must replace your undertaking to v18.104.22.168, then v22.214.171.124, then 1.8.1, then 1.8.2, and so forth.
One other factor to recollect is the breaking adjustments and the migration steps. Generally they’re easy, and also you don’t want to vary something in your code, however typically it’s going to take some time to replace your code and transfer to the following model, so learn rigorously each launch to keep away from lacking something. That’s why it’s important to not skip any model when updating.
Additionally it is a good suggestion to have a great check protection in your software earlier than updating, however I do know typically this isn’t the case. So be sure to run your app after each replace, examine if issues are working appropriately, or run your check suite.
One factor that could be laborious to grasp is the best way to replace your packages, typically, there’s a dependency that’s not updating, and it is advisable to do this manually.
In the event you can not discover a model that satisfies your Meteor model or if the Package deal is now not maintained, you possibly can all the time carry this bundle to your app and override something you need and ping us on Github.
You possibly can examine right here how Packages work
In a nutshell, to carry a bundle to your undertaking and override something you need:
- It is advisable create a folder referred to as
packagesin your undertaking root
- Create a folder with the identical title of the bundle that you simply wish to override. E.g.:
- After that, copy the code from the bundle repository and paste it into your created folder.
- Now you possibly can replace any code that you simply want, like updating a dependency model that may be discovered within the
api.versionsFrom('x.x.x'); technique might be actually useful to get the identical bundle variations which are already in your undertaking – that is positioned in
Node model, if it was up to date, you must clear your
node_modules folder and run
meteor npm set up to ensure it’s going to obtain the right packages for the newer node model. Do not forget to run your undertaking and check suites to make sure every little thing works correctly.
Essentially the most essential updates and the updates that can demand extra work are MongoDB. There are just a few Breaking Modifications of their API, particularly in
v2.6, however there are migration guides that can assist you to undergo this with none ache.
Good luck updating your Meteor app.