Skip to content

Conversation

MMMMMNG
Copy link

@MMMMMNG MMMMMNG commented Apr 26, 2025

Fixes #180

Compiling Main.elm always failed for me with a really unhelpful message:

I do not recognize this flag:

    -

Maybe you want one of these instead?

    --docs=<json-file>
    --debug
    --output=<output-file>
    --report=<report-type>
    --optimize

I was stumped until I saw issue #180. I made sure my path (which contained a dash surrounded by spaces) actually was the problem by executing elm make <full - path without quotation marks> and got the same message.
Then I edited node_modules/elm-webpack-loader/index.js directly and found that wrapping the path(s) with quotation marks fixes the problem. But I have only tested this on windows, so I'm not sure how robust it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Path with " - " fails compilation.
1 participant