当我致电mix phoenix.server
时,我收到以下错误消息。我试过重新启动计算机。
macOS Sierra 10.12.4(16E195)
Elixir 1.4.2
defp deps do
[{:phoenix, "~> 1.2.1"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"}]
end
** (EXIT from #PID<0.70.0>) an exception was raised:
** (File.Error) could not write to file "/Users/joseph/sites/super/_build/dev/consolidated/Elixir.Ecto.Queryable.beam": permission denied
(elixir) lib/file.ex:719: File.write!/3
(mix) lib/mix/tasks/compile.protocols.ex:127: Mix.Tasks.Compile.Protocols.consolidate/4
(elixir) lib/task/supervised.ex:85: Task.Supervised.do_apply/2
(elixir) lib/task/supervised.ex:36: Task.Supervised.reply/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
21:03:23.486 [error] Task #PID<0.185.0> started from #PID<0.70.0> terminating
** (File.Error) could not write to file "/Users/joseph/sites/super/_build/dev/consolidated/Elixir.Poison.Decoder.beam": permission denied
(elixir) lib/file.ex:719: File.write!/3
(mix) lib/mix/tasks/compile.protocols.ex:127: Mix.Tasks.Compile.Protocols.consolidate/4
(elixir) lib/task/supervised.ex:85: Task.Supervised.do_apply/2
(elixir) lib/task/supervised.ex:36: Task.Supervised.reply/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Function: #Function<8.61154972/0 in Mix.Tasks.Compile.Protocols.consolidate/6>
Args: []
21:03:23.487 [error] Task #PID<0.181.0> started from #PID<0.70.0> terminating
** (File.Error) could not write to file "/Users/joseph/sites/super/_build/dev/consolidated/Elixir.Phoenix.HTML.FormData.beam": permission denied
(elixir) lib/file.ex:719: File.write!/3
(mix) lib/mix/tasks/compile.protocols.ex:127: Mix.Tasks.Compile.Protocols.consolidate/4
(elixir) lib/task/supervised.ex:85: Task.Supervised.do_apply/2
(elixir) lib/task/supervised.ex:36: Task.Supervised.reply/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Function: #Function<8.61154972/0 in Mix.Tasks.Compile.Protocols.consolidate/6>
Args: []
答案 0 :(得分:2)
我不知道为什么会遇到这个问题。
但是我通过在我的应用程序的根目录中运行sudo chmod 777 _build/dev/consolidated
来修复它。