问题
With a fresh install of Phoenix, I tried to trigger a new project, and when I try to run the server, I'm met with:
Unchecked dependencies for environment dev:
* gettext (Hex package)
the dependency is not available, run "mix deps.get"
* phoenix_live_reload (Hex package)
the dependency is not available, run "mix deps.get"
* cowboy (Hex package)
* List item
...
but when I run mix deps.get
I get:
Running dependency resolution
** (UndefinedFunctionError) undefined function Access.Map.get_and_update!/3 (module Access.Map is not available)
Access.Map.get_and_update!(%Mix.Dep{app: :cowboy, deps: [], extra: [], from: "/Users/victoriawagman/Dropbox/Hemsidor/digitalocean/hello_phoenix/mix.exs", manager: nil, opts: [hex: :cowboy, build: "/Users/victoriawagman/Dropbox/Hemsidor/digitalocean/hello_phoenix/_build/dev/lib/cowboy", dest: "/Users/victoriawagman/Dropbox/Hemsidor/digitalocean/hello_phoenix/deps/cowboy"], requirement: "~> 1.0", scm: Hex.SCM, status: {:unavailable, "/Users/victoriawagman/Dropbox/Hemsidor/digitalocean/hello_phoenix/deps/cowboy"}, top_level: true}, :deps, #Function<13.85268495/1 in Hex.Resolver.attach_dep_and_children/3>)
(hex) lib/hex/resolver.ex:188: Hex.Resolver.attach_dep_and_children/3
(hex) lib/hex/resolver.ex:148: Hex.Resolver.get_deps/5
(hex) lib/hex/resolver.ex:107: Hex.Resolver.activate/6
(hex) lib/hex/resolver.ex:31: Hex.Resolver.resolve/3
(hex) lib/hex/remote_converger.ex:31: Hex.RemoteConverger.converge/2
(mix) lib/mix/dep/converger.ex:92: Mix.Dep.Converger.all/4
(mix) lib/mix/dep/converger.ex:47: Mix.Dep.Converger.converge/4
I'm at loss for what to search for to dig deeper into trying to figure out what I can do to understand what is wrong and fix it. Please assume that I have no clue, I'm learning.
Also, I don't know how to separately re-install just hex, so I'm looking for that now, if it is so that I also have a corrupt install of hex.
回答1:
It seems that my install of hex was corrupt. running
mix local.hex
as per Henrik's suggestion solved this! He'd a post by someone else indicating that hex might be corrupt.
Next up was a warning about missing module brunch, but that was solved by running npm install (as the output when triggering the server suggested).
Happy days!
来源:https://stackoverflow.com/questions/34567624/undefinedfunctionerror-phoenix-elixir-new-project