In Elixir/Phoenix, after template change, “cannot define module MyApp.PageView because it is currently being defined”

时光总嘲笑我的痴心妄想 提交于 2021-01-28 03:50:49

问题


I just changed an image path in a template in my Phoenix app and reloaded the page. This error message appeared in the browser:

CompilationError at GET /
Showing console output

== Compilation error on file web/views/page_view.ex ==
** (CompileError) web/views/page_view.ex:1: cannot define module Youli.PageView because it is currently being defined in web/views/page_view.ex:1
    (stdlib) erl_eval.erl:657: :erl_eval.do_apply/6

Running mix compile in the terminal made the problem go away, but isn't there some way to skip that step?


回答1:


It is a bug in Elixir that has been fixed in Elixir v1.0.3.



来源:https://stackoverflow.com/questions/28912614/in-elixir-phoenix-after-template-change-cannot-define-module-myapp-pageview-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!