Open rishinair-27 opened 5 years ago
Ran into this myself! Validated that running mix phx.new
instead of mix phx.new.web
solved it.
Hmm, I'm seeing this as well with the new update. I validated it worked ~in Phoenix 1.4.2~ through Phoenix 1.4.3. I'll have to do some digging as to why this no longer works. It might be a bug in Phoenix itself.
@geolessel the config file generated with .web is totally different than what you have listed in the repo. I think that should be the right place to start.
Cross posted from: https://elixirforum.com/t/mix-phx-server-has-weird-output-does-not-start-on-port-4000/22887/11
With Elixir 1.8.1 and Phoenix v1.4.6
$ mix phx.new.web auction_web --no-ecto
Is producing a ../apps/auction_web/ directory with no /config:
.gitignore README.md assets lib mix.exs priv test
But looking at the github repository for the book ( https://github.com/PhoenixInAction/phoenix-in-action/tree/master/ch06/auction_umbrella/apps/auction_web ) it looks like it is supposed to be there.
Downgraded to phx 1.4.2 (which is used in the book), deleted ../apps/auction_web/ then ran $ mix phx.new.web auction_web --no-ecto again.
Now there is a ../apps/auction_web/config directory and mix phx.server works as expected and is using port 4000.
$ mix phx.server
14:47:07.837 [info] Running AuctionWeb.Endpoint with cowboy 2.6.3 at 0.0.0.0:4000 (http)
14:47:07.845 [info] Access AuctionWeb.Endpoint at http://localhost:4000
Looks like something changed or broke between 1.4.2 and 1.4.6.
open config/config.exs
and at the end add :
import_config "#{Mix.env()}.exs"
This bug was already fixed here: https://github.com/phoenixframework/phoenix/commit/fb3c92309c02cca1e4b3d857f8f19f27987078d0
Thanks psantos10
Thanks everyone for the reports and especially @psantos10 who opened the Phoenix issue. I'm going to leave this issue open until the fix makes it into a release.
I don't understand how this line fixed your issue ! It just does not for me Does anyone got the same issue and that line write down in the config/config.exs but still not working ?
Hi,
I'm using the latest Phoenix v1.4.6
The command mix phx.new.web auction_web --no-ecto. does not work.
When i run the mix.server command, after running above, this is what i get ---
$ mix phx.server Compiling 11 files (.ex) Generated auction_web app
23:48:11.383 [info] Access AuctionWeb.Endpoint at http://localhost
And it just hangs there.
I'm not sure whether this is a bug with the Phoenix framework itself.
################################################################ Instead i had to use the mix phx.new command to get the web app/phoenix working.