aus
Cannot start observer: (UndefinedFunctionError) function :observer.start/0 is undefined
If I start the Elixir repl with iex, I can start the observer by :observer.start(). So far, so good.
If a create an app with mix new myapp and start it with iex -S mix, attempting to start the observer results in the following error:
** (UndefinedFunctionError) function :observer.start/0 is undefined (module :observer is not available)
:observer.start()
iex:2: (file)
I used to be able to start the observer within a running mix project using previous versions of Erlang and Elixir (I’m now using 25.3.2.2/1.15.0). What happened? Am I missing anything?
Thanks.
Most Liked
benstepp
adamu
This looks like an issue caused by code path pruning introduced in Elixir 1.15.
if you have an application or dependency that does not specify its dependencies on Erlang and Elixir application, it may no longer compile successfully in Elixir v1.15
The fix is to add :observer and :wx to your list of :extra_applications in mix.exs.
It’s a bit strange that we need to opt-in to something in a mix project that’s already available by default in vanilla iex, though.
josevalim
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









