简体   繁体   English

将小袋鼠添加到我的Elixir / Phoenix项目时,无法编译依赖项:mimerl

[英]Could not compile dependency :mimerl when adding wallaby to my Elixir/Phoenix project

I'm new to Elixir/Phoenix and I'm now looking to write tests using Wallaby (or Hound, but it's the same issue). 我是Elixir / Phoenix的新手,现在正在寻找使用Wallaby(或Hound,但这是同一个问题)编写测试的方法。

For your information, I'm using a Docker image. 供您参考,我正在使用Docker映像。

I'm trying to get Cabbage and Wallaby working, but as soon as I add Wallaby dependency to my project: 我正在尝试使CabbageWallaby正常工作,但是一旦我将Wallaby依赖项添加到我的项目中:

...
  defp deps do
    {:phoenix, "~> 1.3.0"},
    ...
    {:cowboy, "~> 1.0"},
    {:wallaby, "~> 0.19.2"}
  end
...

then I have the following error when I run mix test : 然后在运行mix test时出现以下错误:

escript: exception error: no match of right hand side value undefined
  in function  rebar_log:log/3 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_log.erl, line 94)
  in call from rebar3:handle_error/1 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 325)
  in call from escript:run/2 (escript.erl, line 759)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
** (Mix) Could not compile dependency :mimerl, "/root/.mix/rebar3 bare compile --paths "/application/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile mimerl", update it with "mix deps.update mimerl" or clean it with "mix deps.clean mimerl"

Anyone who knows why do I have this error and how I could fix it? 谁知道我为什么会有这个错误以及如何解决这个错误?

I finally figured out what was causing this issue: proxy! 我终于弄清楚了导致此问题的原因:代理!

I first tried to run this rebar3 process manually: 我首先尝试手动运行此rebar3进程:

docker run --rm -it <container-name> /root/.mix/rebar3

And I was already having the error. 而且我已经有错误了。 Playing around in the container, I discovered that removing the proxy was making the process no more through any errors. 在容器中玩耍时,我发现删除代理不会使该过程不再出现任何错误。

So, no matter about Docker, it was all about unsetting the company proxy of my machine in order to get it working through the public network. 因此,无论使用Docker,都是为了取消我的机器的公司代理,以使其通过公共网络工作。

您可以在依赖项的版本之后添加,only::test ,然后尝试并在运行mix test之前运行mix deps.get

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Docker +旧版本的Elixir / Phoenix - Docker + older version of Elixir/Phoenix 为 elixir 项目编译牛仔时出现语法错误 - Syntax error when compiling cowboy for elixir project Elixir在phoenix代码重新加载器打开的情况下在docker中请求变慢 - Elixir requests slow in docker with phoenix code reloader on 在Docker中使用Erlang Observer App和远程Elixir Phoenix服务器 - Using the Erlang Observer App with a remote Elixir Phoenix server inside Docker 在容器化的Elixir 1.6.1中运行phoenix测试的数据库所有权过程错误 - DB Ownership process error running phoenix test in containerized elixir 1.6.1 无法从Docker中的elixir / phoenix连接到SQL Server - Can't connect to SQL Server from elixir/phoenix in Docker Dockerized Phoenix / Elixir应用程序拒绝所有HTTP /套接字请求 - Dockerized Phoenix/Elixir App Rejects All HTTP/socket requests 如何在 Heroku 上创建/迁移 Elixir Phoenix Docker 镜像? - How to create/migrate Elixir Phoenix Docker image on Heroku? 运行 npm 安装时 Angular 应用程序错误 - 无法解决依赖关系 - Angular app error when running npm install - Could not resolve dependency 如何使用 Phoenix Guides 中的示例在生产模式下运行 Elixir Phoenix Docker? - How do I run Elixir Phoenix Docker in production mode using example from Phoenix Guides?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM