Elm Compiler "Map.!: given key is not an element in the map"

July 8, 2019

There's an issue with the Elm compiler documented here that results in the error message:

Map.!: given key is not an element in the map

Though it is not resolved, there are a few things you can do to get around it for now:

  1. Don't use Array in a custom type (use List instead)
  2. Try removing elm-stuff and recompile
  3. Compile without the --debug flag

Using Array in a custom type was what led me to the error, and substituting for List made it go away.

Looking forward to updating this post when the issue is resolved!

Made it this far? Have a go at the game of snake