在Elixir/Phoenix中,更改模板后,“无法定义模块MyApp.PageView,因为当前正在对其进行定义". [英] In Elixir/Phoenix, after template change, "cannot define module MyApp.PageView because it is currently being defined"

查看:56
本文介绍了在Elixir/Phoenix中,更改模板后,“无法定义模块MyApp.PageView,因为当前正在对其进行定义".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Phoenix应用程序中的模板中更改了图像路径,然后重新加载了页面.此错误消息出现在浏览器中:

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

在终端中运行 mix compile 可以使问题消失,但是没有办法跳过该步骤吗?

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

推荐答案

这是Elixir中的一个错误,已在Elixir v1.0.3中修复.

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

这篇关于在Elixir/Phoenix中,更改模板后,“无法定义模块MyApp.PageView,因为当前正在对其进行定义".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆