install elm 0.16 and its dependenices

53 views Asked by At

I need to get acquainted specifically with elm 0.16.XX because some project I am working on is using it, and long story short,e.g. the version cannot be changed. Also, as you guys know there is a significant change between 0.16 and later elm versions. I am doing an online video course that has the 0.16.XX version but when I install elm, it naturally installs the latest version. How can I install the older versions?

The info I see online says to just change in elm.json, the version numbers of dependencies you need, but the problem is that the names of the dependencies have also changed. e.g in a basic hello world project,

0.16.xx

"elm-lang/core": 5.1.1, "elm-lang/html": 2.0.0, "elm-lang/virtual dom": 2.0.4

as opposed to modern elm

"elm/core": 1.0.5, "elm/html": 1.0.0, "elm/virtual-dom": 1.0.3

So how do I go about installing older elm i.e 0.16.XX. Any help is appreciated.

2

There are 2 answers

0
pdamoc On

In theory, you could download the source code zip and try to build from sources but I remember people having a lot of trouble with the particular Haskell dependencies.

If the app is an Html based app that used evancz/start-app you might have some luck by first upgrading to 0.17.1. Take a look at https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md

You might be able to install 0.17.1 with npm i -D [email protected].

elm.json is available only to 0.19 and 0.19.1 projects. The versions before that used elm-package.json

0
marcw On

You can download Elm 0.16 installers for Windows and Mac Elm from the official releases.

https://github.com/elm/compiler/releases/tag/0.16.0

But I have no idea if installing the dependencies still works.

So maybe you'll need to incrementally upgrade your code, see https://github.com/elm-lang/elm-platform/tree/master/upgrade-docs

If that is too complicated, maybe you can ask in the Elm slack if someone can upgrade the code for you? E.g. with a small freelancer contract?