Hey,
I know, I know, it its a little bit ironic as I always tend to use the most modern hardware, but I’m currently having a really hard time getting perfectly working Elm 0.18 code working on Apple M1 hardware. Yes, the best solution would be to finally update all the code to Elm 0.19, but because of some cross dependencies in our monorepo, this was not a viable solution until now. It also worked for a long time using an x86 based Docker image which executed the Elm compiler without problems. However this stopped working like a month ago with the following error:
Module build failed (from ./node_modules/elm-webpack-loader/index.js):
Error: Compiler process exited with error Compilation failed
elm-make: out of memory (requested 1048576 bytes)
Btw. fiddling around with ALL the Docker settings and also updating to first official Docker M1 release did not solve the problem!
Running Elm directly on the M1 does also not work because of the following, totally understandable error:
npm ERR! code 1
npm ERR! path /opt/homebrew/lib/node_modules/elm
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! Unfortunately, there are currently no Elm Platform binaries available for your operating system and architecture.
npm ERR!
npm ERR! If you would like to build Elm from source, there are instructions at https://github.com/elm-lang/elm-platform#build-from-source
So my questions to the community are:
- Did anybody encountered the same issues?
- How did you solve it?
- Is there some nice info/blog post on how to build Elm from source? (Tried that in Docker, but gave up)
- Did somebody build a Docker image that just works?™
TIA