Mix command errors in new project



Can you please try echo $MIX_ENV/ as well?

As the files seem to work for us, I’m pretty sure that it is something about your MIX_ENV environment variable…

The way, how the error message is printed:

.exsCode.LoadError) could not load /Users/htran/Desktop/hello/config/dev
^^^^                                                                 ^^^^^^

is very suspicious and makes me wonder why the file ending is printed on the beginning of the line. This is usually the case, when there is some stray \r in a printed string…


Running the command in my project root directory results in

$ echo $MIX_ENV/


This is really weird…

Could you please tar your config/config.exs and push it to the repository? It has to be a file where the problem still persists.

Also please try to clone the project from GitHub and check if you still have the problem after cloning it. Git might normalize some things away in text files…


I just pulled my hello project from github and am no longer getting errors when trying to run mix in the project folder. This is indeed weird. If you’d still like to see my config.exs file I can push it to the repo.


Yes I’d be happy to. I’d really like to know why this is happening in the first place.


Pushed config.tar to the root folder which contains my config.exs file. I’m leaving my office right now so I might be a little unresponsive until tomorrow. Thanks in advance for the input and help!


This is weird. If I use that file from the archive it works. So it seems to be not that file causing the issue. But I can not image where it comes from.

You say it is for all fresh generated phoenix projects? Can you please remove phx_gen and reinstall it?


Does running this command in a terminal produce any output? env | grep MIX_ENV


Running env | grep MIX_ENV in my project root folder does not produce output


After doing this I was able to make new phoenix projects and they worked. Not sure if this was the fix or if pulling the project off of github did something to fix my environment.