酿酒厂失败,并显示消息“多重定义的模块:'Elixir.Telemetry'”

时间:2019-04-02 05:28:25

标签: elixir phoenix-framework distillery

当我尝试使用Distillery升级正在运行的Phoenix应用程序时,构建失败并显示以下消息:

Generated teamgenik app
==> Assembling release..
==> Building release my_app:0.10.7 using environment prod
==> Generated .appup for artificery 0.2.6 -> 0.4.1
==> Generated .appup for db_connection 2.0.3 -> 2.0.6
==> Generated .appup for decimal 1.6.0 -> 1.7.0
==> Generated .appup for ecto 3.0.6 -> 3.0.8
==> Generated .appup for ecto_sql 3.0.4 -> 3.0.0
==> Generated .appup for phoenix 1.4.0 -> 1.4.3
==> Generated .appup for phoenix_html 2.13.0 -> 2.13.2
==> Generated .appup for phoenix_pubsub 1.1.1 -> 1.1.2
==> Generated .appup for plug 1.7.1 -> 1.7.2
==> Generated .appup for plug_cowboy 2.0.1 -> 2.0.2
==> Generated .appup for teamgenik 0.10.6 -> 0.10.7
==> Generated .appup for telemetry 0.3.0 -> 0.2.0
==> Release failed with multiple errors:
    Multiply defined module: 'Elixir.Telemetry'

我使用这个应用程序已有几个月,并且已经成功升级了几次。这次,我想将Phoenix的版本从1.4.0提升到1.4.3。

我已经在Elixir论坛上阅读了此条目:

https://elixirforum.com/t/distillery-build-error-multiply-defined-module-elixir-collectable-ecto-adapters-sql-stream/19489

我尝试了mix deps.clean --allmix release.clean。有什么建议或建议吗?

更新

我注意到了一种特殊的现象。当我在bin/my_app upgrade 0.10.7上执行RELEASE_ROOT_DIR时,收到以下错误消息(请注意双引号和逗号之间的逗号):

Could not locate code path for release-my_app","0.10.6!

1 个答案:

答案 0 :(得分:1)

尽管我无法检测到问题的根本原因,但还是设法通过以下方式升级了我的应用程序。

  1. 停止应用。
  2. 删除发布目录。
  3. 重新创建发布目录。
  4. 从源目录中删除_build目录。
  5. 使用mix release部署应用。

换句话说,我放弃了主机代码交换,并选择重新部署我的应用。

我的问题似乎与以下问题有关:

两个都已经关闭。我认为我的问题是由于Distillery旧版安装的某些错误引起的,以后我再也不会遇到它了。

相关问题