Search code examples
elmelm-make

elm-make can't find files after moving files into subdirectory


I refactored my Elm code to be located in the src directory. And I updated elm-package.json to have "source-directories": [ "src" ],

However, now when I run elm-make Main.elm I get this error message:

elm-make: Main.elm: openFile: does not exist (No such file or directory)

Is there another configuration somewhere else I need to make to have elm-make be able to find my code?


Solution

  • You still need elm-make src/Main.elm as that is being run from the command line, but now any import statements in Main.elm will be looked up in src/...