Warm tip: This article is reproduced from stackoverflow.com, please click
aurelia

How to upgrade Aurelia project from version v0.24.0 to current version v1.2.3

发布于 2020-03-31 22:53:29

I'm trying to upgrade a very old version of Aurelia CLI project v0.24.0 to the current version v1.2.3. I've tried to follow the steps from this link from the docs but when I try to run it I receive this error:

Screenshot of error

So my question is what is the best approach to upgrade it from such an old version to the newest one?

Questioner
Alex Talmazan
Viewed
17
Juliën 2020-01-31 18:55

Just a screenshot of error is too little info to give proper advice on. And between the currently latest version of v1.2.3 and v0.24.0 (Jan, 2017) there's roughly 3 years. Fun part is, you'd be amazed at relatively how little Aurelia core itself has changed. Simply because a lot remained stable.

Most impactful changes will be in either:

  • aurelia_project folder, with the build and config routines
  • bundler config (system.js, webpack, requirejs - whichever you've used)

That being said, this does not necessarily mean that your dependencies have also remained stable in those past three years. Especially in Javascript world. To accommodate for this, I would suggest:

  1. Create a blank, new project with the latest Aurelia CLI
  2. Copy/paste over the /src folder from your old project to your new one
  3. Take in consideration specifics, like package.json from your old project and migrate them by hand (reinstalling) in your new project

Again, try to keep your bundler similar and you will have relatively little changes. But if you choose you want to migrate from System.Js to Webpack, it'll be a bit more hassle. But arguably, rewarding in the end if your project needs to be kept alive for a longer while.

Considering the age of your old project, restarting with a clean setup and config is what I would consider to be "the best way" to retouch only the necessities.