halfzebra / create-elm-app

🍃 Create Elm apps with zero configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails with elm-app but not with elm make

wjdhamilton opened this issue · comments

Is this a bug report?

Yes

When trying to compile this project as it is at this branch:

https://github.com/wjdhamilton/marketing-planner/tree/MP-14

with elm-app start

Deleting elm-stuff doesn't help, but on the other hand I can build using elm make. The source of the problem may be a newly added package, "prikhi/decimal": "2.0.0", but that doesn't explain why the normal elm compiler still works.

Environment

  1. node -v: v10.6.0
  2. npm -v: 6.10.3
  3. yarn --version (if you use Yarn): 1.15.2
  4. npm ls create-elm-app -g (if you haven’t ejected): 3.2.1

Then, specify:

  1. Operating system: Mac OSX
  2. Browser and version (if relevant): N/A

Steps to Reproduce

  1. Type in elm-app start

Expected Behavior

I expected it to compile as normal

Actual Behavior

I get this error message:

Error: Compiler process exited with error Compilation failed
Dependencies loaded from local cache.
Dependencies ready!                
Success! Compiled 8 modules.
elm: Map.!: given key is not an element in the map
CallStack (from HasCallStack):
  error, called at libraries/containers/Data/Map/Internal.hs:603:17 in containers-0.5.10.2:Data.Map.Internal
 @ ./src/index.js 2:0-33 4:10-13
 @ multi /usr/local/lib/node_modules/create-elm-app/config/polyfills.js /usr/local/lib/node_modules/create-elm-app/scripts/utils/webpackHotDevClient.js /usr/local/lib/node_modules/create-elm-app/node_modules/react-error-overlay/lib
/index.js ./src/index.js

Reproducible Demo

https://github.com/wjdhamilton/marketing-planner/tree/MP-14

Just clone this branch and run elm-app-start, should produce the same error.

NB: This app is owned by my little company, but it is free to use on GitHub, so I will make the repository private again once this bug is fixed.

Hi James! Thanks for reporting this, chances are pretty high that this issue is originating from the compiler.

Try running:

ELM_DEBUGGER=false elm-app start

This should work, but the debugger will be unavailable. I'll close this issue, but please feel free to comment or reopen if you are experiencing further issues.

Thank you, HalfZebra! Just back in the office and tried your solution. That has fixed it.

Thanks for the feedback!

Happy to help! 👍

You might be interested to know that this failure can be caused by a dependency being classed as indirect. If you move that dependency from indirect to direct then this problem is fixed and you can use the debugger.