elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.48k stars 659 forks source link

Cross-platform Docker setup fails on M1 mac while setting up elm using using npm install #2232

Open basghar opened 2 years ago

basghar commented 2 years ago

Quick Summary: We use docker in order to support multi-platform dev environment. On M1 macs, npm install -g elm fails because there is no pre-build binary for linux_arm64. We want to avoid having different docker for different platform.

This is use-case for #2007

> node install.js

-- ERROR -----------------------------------------------------------------------

I am detecting that your computer (linux_arm64) may not be compatible with any
of the official pre-built binaries.

I recommend against using the npm installer for your situation. Check out the
alternative installers at https://github.com/elm/compiler/releases/tag/0.19.1
to see if there is something that will work better for you.

From there I recommend asking for guidance on Slack or Discourse to find someone
who can help with your specific situation.

--------------------------------------------------------------------------------

Additional Details

None

github-actions[bot] commented 2 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.

cllns commented 2 years ago

Just ran into this same issue.

A workaround I found is to specify v0.19.1-4, which has a commit that added support for ARM (for macOS Silicon). It also added support for linux_arm64 as a byproduct of this.

The current release, one patch version higher at v0.19.1-5 includes a commit that continues to support apple_arm64 but inadvertently drops support for linux_arm64 (which is what Docker uses on hosts that are Apple Silicon, i.e. apple_arm64).

akoppela commented 2 years ago

As an alternative nix can be used to build docker images. Because nix has support to build Elm on ARM.

mageekguy commented 1 year ago

Hi! Is it possible to merge this PR? Or to say what is the problem with it? Because I need to use a linux_arm64 version of elm with npm, and without this fix, it is currently impossible to do that.

gpositive commented 12 months ago

Hello,

Any news regarding this PR? It's still a blocker for us. Is there any way we can help progressing this a bit faster?

Thanks!

lydell commented 12 months ago

https://github.com/elm/compiler/pull/2287#issuecomment-1632351816