1

I have a Mac and elm 0.18 is installed in /usr/local/bin.

This was fine since I an using elm 0.18 in a project.

Now I am responsible for project that users elm 0.19.

Is is possible to have both 0.18 and 0.19 on my machine.

for example

workspace/project1 uses elm 0.18 workspace/project2 uses elm 0.19

wherever I run elm --version is reports 0.18, even in the project directory that has elm dependency defined as 0.19.

Jon Raynor
  • 3,804
  • 6
  • 29
  • 43

2 Answers2

5

its easy enough to do run two versions of elm - just install the version you want into your directory npm install elm@0.18 and use npm scripts or npx so that you are using local versions.

Your challenge will be that some of the editor support has an option to choose between which version you want support with, and toggling that can become annoying.

Simon H
  • 20,332
  • 14
  • 71
  • 128
0

asdf is another good option: github repo.

asdf install elm 0.18
asdf install elm 0.19
asdf global elm global 0.19
# change to 0.18 directory
asdf local elm 0.18

asdf has the benefit of having plugins for other languages too!

Kevin Brown
  • 12,602
  • 34
  • 95
  • 155