Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags


How to check Elm version on macOS

Faraz Karim

Elm is a programming language that compiles to JavaScript and allows you to create web interfaces and web browsers.

The easiest, most convenient method is to use the homebrew package manager to handle the Elm package. Alternative methods include downloading the Elm zip file, installing Elm from a docker image, and using an Elm installer macOS.

You can visit the official Elm website for further details on these alternate methods.

We will be focusing on using the most simple and common method in this article.

The homebrew package manager

The homebrew package manager handles all of the dependencies and sets up the Elm environment, which makes our lives easier.

To install homebrew, open up your mac terminal and run the following command:

/usr/bin/ruby -e "$(curl -fsSL"

Elm installation

In case you do not have any version of Elm on your system, it is straightforward to install one through the homebrew package manager; just run the following commands:

brew install elm

Now you can run the

brew info elm

command to verify your installation.

Checking Elm version using homebrew

Now, with homebrew package manager installed, you can easily check the installation status of Elm by running the following command on your mac terminal:

brew info elm

You can also run the following command to get the installed version of Elm:

elm --version

Switching your Elm version

Another functionality of homebrew is that it allows the user to switch between different versions of Elm available on a system. This can come in handy if you plan to check the behavior of your program on multiple systems (new and old).

To switch between versions of Elm in your system, you can run the following command:

brew switch Elm <elm version>

In the above command, you would need to replace the <elm version> with the actual version number of Elm that you want to switch to (assuming it is present on your system).




Faraz Karim
Copyright ©2022 Educative, Inc. All rights reserved

View all Courses

Keep Exploring