Mix command errors in new project

phoenix
troubleshooting

#21

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…


#22

Running the command in my project root directory results in

$ echo $MIX_ENV/
/


#23

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…


#24

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.


#25

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


#26

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!


#27

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?


#28

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


#29

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


#30

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.