(ArgumentError)无法将列表转换为字符串

时间:2016-03-20 20:47:23

标签: phoenix-framework

所以我正在开发应用程序的前端,并在尝试运行服务器时遇到了一些问题。第一个问题是过时的依赖关系,我很容易修复。下一个让我感到难过,因为我以前从未处理过凤凰城,而且我没有写下应用程序的后端。

所以在更新deps之后我重新启动了服务器并遇到了这个错误:

[error] #PID<0.422.0> running KeenWeb.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
    ** (ArgumentError) cannot convert list to string. The list must contain only integers, strings or nested such lists; got: [[[[[[[[["" | "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"description\" content=\"keen to work\">\n    <meta name=\"author\" content=\"keen works LTD\">\n\n    <title>Keen to work</title>\n  \n    <!-- Bootstrap -->\n    <link href=\"/css/bootstrap.min.css\" rel=\"stylesheet\">\n\n    <link rel=\"stylesheet\" href=\""] | "/css/app.css"] | "\">\n\n    <script type=\"text/javascript\">\n      window.DEFAULT_SETTINGS = "] | nil] | ";\n    </script>\n    <!-- Fonts -->\n    <link href='https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Roboto+Slab' rel='stylesheet' type='text/css'>\n\n  </head>\n\n  <body>\n    <main id=\"main_container\" role=\"main\"></main>\n    "], "" | "<div id='app'></div>\n"] | "\n    "], "" | "\n      <script src='http://localhost:3000/app.js'></script>\n    "] | "\n\n    <!-- jQuery -->\n    <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js\"></script>\n    <!-- // <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/alert.js\"></script> -->\n\n    <!-- Bootstrap -->\n    <script src=\"js/bootstrap.min.js\"></script>\n  </body>\n</html>\n"]
        (elixir) lib/list.ex:624: List.to_string/1
        (phoenix_live_reload) lib/phoenix_live_reload/live_reloader.ex:93: anonymous fn/1 in Phoenix.LiveReloader.before_send_inject_reloader/1
        (elixir) lib/enum.ex:1473: Enum."-reduce/3-lists^foldl/2-0-"/3
        (plug) lib/plug/conn.ex:885: Plug.Conn.run_before_send/2
        (plug) lib/plug/conn.ex:336: Plug.Conn.send_resp/1
        (keen_web) web/controllers/page_controller.ex:1: KeenWeb.PageController.action/2
        (keen_web) web/controllers/page_controller.ex:1: KeenWeb.PageController.phoenix_controller_pipeline/2
        (keen_web) lib/phoenix/router.ex:261: KeenWeb.Router.dispatch/2
        (keen_web) web/router.ex:1: KeenWeb.Router.do_call/2
        (keen_web) lib/keen_web/endpoint.ex:1: KeenWeb.Endpoint.phoenix_pipeline/1
        (keen_web) lib/plug/debugger.ex:93: KeenWeb.Endpoint."call (overridable 3)"/2
        (keen_web) lib/phoenix/endpoint/render_errors.ex:34: KeenWeb.Endpoint.call/2
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

有谁知道这意味着什么?或者如何解决它?

1 个答案:

答案 0 :(得分:1)

我们有window.settings没有任何设置,这导致了渲染。通过删除它来解决这个问题。