aisukuma
Mix command errors in new project
Hello all, I just got a new work station and have been trying to set up a new Phoenix Project for an app I’m working on. However I’m running into an issue that I haven’t seen before. I’m able to run ‘mix phx.new hello’, but after I ‘cd hello’ and try to run any mix command, I get the following error:
$ mix
.exsCode.LoadError) could not load /Users/htran/Desktop/hello/config/dev
(elixir) lib/code.ex:1147: Code.find_file/2
(elixir) lib/code.ex:706: Code.eval_file/2
(mix) lib/mix/config.ex:187: anonymous fn/2 in Mix.Config.import!/2
(elixir) lib/enum.ex:1925: Enum.“-reduce/3-lists^foldl/2-0-”/3
(mix) lib/mix/config.ex:186: Mix.Config.import!/2
(stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
(elixir) lib/code.ex:232: Code.eval_string/3
Following the installation guide, I’ve already installed Elixir, Erlang, Phoenix, Node and Postgresql. Is there anything I’m missing?
Not sure if this is relevant but this is my ‘mix -v’
Erlang/OTP 21 [erts-10.1.3] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe] [dtrace]
I wasn’t getting this kind of error on my previous work station, so I’m thinking I missed a prerequisite or something. Thanks in advance!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance











First 10 of 29 Posts
chensan
Is there anything wrong with your
dev.exsfile?aisukuma
I haven’t touched my dev.exs file, do I need to add anything to it? This is what it looks like:
Sorry if I’m asking anything trivial, this is actually my first time setting up a Phoenix Project by myself.
yurko
Maybe it’s trying to find a secret part of a config? Look for something like
import_config "dev.secret.exs".aisukuma
I have the
import_config "dev.secret.exs"line in my prod.exs file, but not in my dev.exs filechensan
Which phoenix version do you have?
How about recreating your
helloproject? It should just works fine out of the box.yurko
that can’t be right
Try to generate a completely new project in another dir and see if it works
aisukuma
Phoenix version:
I’ve tried several times to create the hello project following the Up and Running guide, I actually just tried again and am still getting the same error.
I’m also on a Mac if that’s relevant at all
aisukuma
Where should the
import_config "dev.secret.exs"line be located?I also just tried to create the project in a different directory and I’m getting the same error,
import_config "dev.secret.exs"is also still in the same place.yurko
It should be in the dev config, prod might have its own secret. Try to kill your generator and install it again. Something like
mix archive.uninstall phx.newand thenmix archive.install hex phx_new 1.4.0.yurko
I just generated a project and see that only prod has a secret and it’s prod.secret:
import_config "prod.secret.exs", dev should just work out of the box.