什么是 elm-make: Map.!: given key is not an element in the map

What is elm-make: Map.!: given key is not an element in the map

使用 elm 0.18 编译时,我得到 elm-make: Map.!: given key is not an element in the map,但我似乎无法在任何 List.map 中找到任何错误。

编辑:我有一个修复程序(在下面发布),但我仍然想知道这个错误的含义和来源。

删除 .elm-stuff 并重新安装软件包可解决此问题。

存在 github 个问题:https://github.com/elm-lang/elm-package/issues/254。目前没有答案,但也许他们会出现在那里......?

0.19 编译器有问题。您可以在这里查看问题的进展:https://github.com/elm/compiler/pull/1850#issuecomment-509327575

同时,您可以安装 0.19.1 编译器的开发版本,在此处使用分支:https://github.com/CurrySoftware/compiler,或者 运行 您的代码没有 --debug 标志。