Elm make needs to be updated to Elm 0.19.1

I should start this by stating that my web dev knowledge primarily consists of 2 year out of date Gatsby knowledge, so I preface all this by saying I frankly have no idea what I’m doing. But, I’m a decent programmer.

The URL for my page is futurespace.netlify.app. As you can see, the build failed.

I decided I wanted to try learning Elm for my personal webpage; I did research over the summer on modeling languages (check out TLA+). I was and am determined to steer clear of writing this thing in javascript/ using npm. Given Netlify uses Elm, I decided to take a leap of faith and try Elm make even though Elm isn’t listed on the common netlify build configurations. I didn’t know to go look at the Deploy log when it didn’t build (RTFM, I realize) so I tried a bunch of other jank business to try to get the page to build but having gone back and made sure the page is building correctly outside netlify, I finally went and checked the build logs.

Lo and behold, it’s telling me I’m building using Elm v. 0.19.0, not 0.19.1! My elm.json requires 19.1, triggering a version mismatch.

If I’m just dumb and need to change some setting on my netlify project to tell it which version of elm to use, please let me know! Currently I don’t have a netlify config file for the project, I didn’t see any variables in the documentation I could set to tell netlify which version of Elm to use, but if there’s something I can do to point it at the right thing I will be happy.

Thank you!

Update: I tried installing Elm v0.19.0 on the machine I’ve been using for development and it has some kind of issues with binwrap-install arising from some deeper thing within the depths of node. There are some workarounds I found publicly to fix the node issues. I’ve been using Gitpod since I can’t just code on my machine and push to netlify to build, but it uses nvm and won’t let me use root so said workarounds are a bust.

Would it be difficult to add a version variable for the Netlify yaml to be able to specify which version of Elm make to use? I don’t know a whole lot about Netlify’s underlying stack but conceptually this seems fairly simple.

Hi, @modestmc, there is an existing feature request for this in our build-image repository here:

I cannot promise a date if/when this will be changed and the only work workaround is the less than optimal one mentioned on the issue above.

Please feel free to comment on the repo/issue to show your interest. You can even create a PR for the change if you want to.

If there are other question about this, please reply here anytime.

1 Like

Hey @luke, great to hear from you! I didn’t know that the netlify build image existed, that’s pretty cool!

I would totally be game to try and submit a PR to add the support I’m looking for. I have a couple of questions about the build-image repo. I still think it’d be nice to get Elm added to the official documentation for supported build stuff. As I see it, that requires the ability to configure a few things, those being:

  1. there will need to be some variable added to the netlify toml file that specifies which version of elm make to use. How is this toml file interpreted by the build-image (and where in the codebase does it do that :slight_smile: )?
  2. Which files in the Dockerfile will I (most likely) need to modify in order to support the different version of elm make? I’ll be getting a good environment set up to tinker with this hopefully by Friday but it’d be nice to have a couple hints on where to look.

Those are the big initial questions I have, odds are I’ll have more once I get into the weeds. One thing I’d note is that it might be nice to stick some content into the wiki for the build-image repo. Plus, you can tell people if they want to add stuff to the build image they can look at the wiki and the main site documentation can point people to the repo if they want to add stuff that’s currently unsupported.

Thanks again, really looking forward to this!

Ok, so I think I found what needs to be changed in the Dockerfile, if you ctrl-f elm you can see where it specifies the version.

Now, I’m not getting the machine to test whether or not changing this will work setup until friday, but I’m fairly certain this is the only thing that needs to be changed to support v0.19.1. The one thing I’m still not sure about is how to make it so that the ELM_VERSION variable can be set in the .toml file the way the other build environment tools can be. I’ll try adding a netlify.toml to my repo with ELM_VERSION = ‘0.19.1’ set in it and see what happens.

One thing I am noticing is there’s decent documentation for a lot of the build tooling from about 2016 but it kinda falls off from there. Also, the main docs.netlify.com don’t really link to the github for the build-image for reasons I’m not really sure about.

I’m not too experienced with .toml files but if you can tell me what parses it, I can figure out what I need to add so that the ELM_VERSION variable in the .toml file feed through correctly. From there I don’t see a whole lot needing to be added for the foreseeable future!

Thanks again!

PS. I accidentally posted this in the wrong place, hopefully adding this line makes it sufficiently distinct as to avoid spam filtering.

You can always try making the change locally and test by following the “What next?” section in this post: [Support Guide] Debugging Netlify site builds.

Also, feel free to put a PR in. It’s easier to ask the questions you asked in the repository as the repo owners will be better abled to answer them.

Hope that helps.

So, I’m posting this for the sake of updates. I may wind up submitting a proper issue on github but I tried following along with the local build guides and ran into one main issue.

The guides have you download and use a prebaked Docker 18.04 image as the base to test locally. My issue is that I’m needing to modify that image by tweaking the docker file. I ran into a couple different issues when trying to build from said docker file. Now, it’s possible I’m using it wrong but I believe it’s also possible the dockerfile that’s up on the github isn’t up to date and it might also be an issue of using some extra flags or the exact command used when trying to build it.

I suspect I’ll wind up having to flag the issue on the repo itself but I thought before I did that I would see if there are any other guides laying around to modifying the actual build image.


@modestmc please feel free to file an issue on the repo! If you can paste the errors you’re running into when building the docker image into that issue, that’d be helpful figuring out what’s going on. Modifying the Dockerfile should only involve making whatever edits you want and then following the instructions in the README.

1 Like