Compilation fails. Space between prod and .exs, prod\s.exs

Really not sure about this error. I can assure you that the prod.exs is named just as it was created by mix :slight_smile:

C:\Users\path to…\root directory>set MIX_ENV=prod && mix compile
** (Code.LoadError) could not load c:/Users/path to…/root directory/config/prod .exs
(elixir 1.10.3) lib/code.ex:1397: Code.find_file/2
(elixir 1.10.3) lib/code.ex:871: Code.eval_file/2
(stdlib 3.8) erl_eval.erl:680: :erl_eval.do_apply/6
(stdlib 3.8) erl_eval.erl:126: :erl_eval.exprs/5
(elixir 1.10.3) lib/code.ex:341: Code.eval_string_with_error_handling/3
(elixir 1.10.3) lib/config.ex:219: Config.eval!/2

Okay, I need to use set "MIX_ENV=prod" && mix compile, ha, ha!

1 Like

You seem to be on Windows and there you have to be extra careful because it doesn’t handle those whitespace cases very well, as you discovered. :slight_smile:

Everything has to be translated - I’ve just deployed and I had a fair few goes at getting the commands correct. All now safely stored in the ReadMe for when I forget the next time :slight_smile: