Example App Causes Error When Installed Beneath an Existing App
clarkware opened this issue · 5 comments
Just a heads-up about installing this within an existing Phoenix app, for example inside of the web/elm directory...
After running elm-github-install
the "example" app ends up in web/elm/elm-stuff. Then if you run "mix compile" from the root directory of the Phoenix app you're embedding Elm within, the gettext compiler isn't happy with the "example" app that comes with "elm-phoenix". You get the following error:
== Compilation error on file web/elm/elm-stuff/packages/saschatimme/elm-phoenix/0.2.0/example/web/gettext.ex ==
** (ArgumentError) unknown application: :elm_phoenix
A work-around is simply to remove the web/elm/elm-stuff/packages/saschatimme/elm-phoenix/0.2.0/example directory. I wonder if perhaps there's a way to not include the "example" app in these situations. In the meantime, it may be worth mentioning this on the README.
Thanks you for this great library!
Mike
@clarkware I ran into this, this was my solution, opsb/elm-optimist@3ae1bb7 (basically move the elm directory somewhere where it won't be picked up by the elixir compiler)
Sorry that you run into a problem. Since the example app is also quite useful for integration tests it is not so easy to remove it at the moment. As an intermediate solution I will add a hint to the README
.
I suspect the directory structure in 1.3 will help with this.