jdj_dk
Mix phx.server does not recompile on changes!
Hi all.
Quick question.
I have a phoenix app which does not recompile when I change any elixir code in dev mode. What could I have screwed up? ![]()
If I change something and type recompile in iex in returns :noop. I am however able to recompile single modules using r Module manually.
I’m running Phoenix 1.4 and Elixir 1.7 on macOS Mojave.
Thanks in advance
Most Liked
l00ker
In my experience changes to the controllers usually recompile when the page is reloaded, but the controllers don’t recompile directly after code changes because they aren’t being watched for changes by live_reload, but if needed, you should be able to add them in config/dev.exs.
# config/dev.exs
...
# Watch static and templates for browser reloading.
config :my_app, MyApp.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
+ ~r{lib/my_app_web/controllers/.*(ex)$},
~r{lib/my_app_web/views/.*(ex)$},
~r{lib/my_app_web/templates/.*(eex)$}
]
]
...
I’m guessing they were excluded from the live_reload patterns for a reason. Too many errors that way maybe? ![]()
NobbZ
If other projects on the same computer work, then you probably have the system level dependencies.
Then I’d try the usual, simply remove deps and _build folder and try again.
OvermindDL1
Huh? I run through tmux excessively, nor do I see any way that tmux would cause such an issue, can you elaborate more? o.O?
Popular in Questions
Other popular 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
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








