thehunmonkgroup
Trying to build a Phoenix 1.4 application via Distillery, and hitting this error:
==> Release failed with multiple errors:
Multiply defined module: 'Elixir.Collectable.Ecto.Adapters.SQL.Stream'
I’ll note that this application is upgraded from Phoenix 1.3.4, and I did clean all the Elixir and Node deps and rebuild them prior to this run.
Google doesn’t seem to be much help with that error, my understanding is that it means the module is defined multiple times through more than 1 dependency. I don’t really know how to go about debugging/solving that issue though…
The verbose logs from the Distillery run are available here under the ‘Details’ of that post: Release build fails with 'No such module: asn1ct' error · Issue #627 · bitwalker/distillery · GitHub
Here’s my entire mix.exs if that helps any…
defmodule Poof.Mixfile do
use Mix.Project
def project do
[
app: :poof,
version: "1.2.4+001",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Poof.Application, []},
extra_applications: [:asn1, :logger, :runtime_tools],
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.4.0"},
{:phoenix_pubsub, "~> 1.0"},
{:ecto_sql, "~> 3.0"},
{:phoenix_ecto, "~> 4.0"},
{:postgrex, "~> 0.14"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:plug_cowboy, "~> 2.0"},
{:timex, "~> 3.4.0"},
{:uuid, "~> 1.1"},
{:basic_auth, "~> 2.2"},
{:dynamic_server_manager, "~> 0.0.10"},
{:distillery, "~> 2.0"},
{:swoosh, "~> 0.13"},
{:tesla, "~> 1.2.0"},
{:jason, "~> 1.1.0"},
{:mox, "~> 0.3", only: :test},
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
# $ mix ecto.setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.clean": ["ecto.drop", "ecto.setup"],
"ecto.seed": ["run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.clean", "ecto.seed"],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
end
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
As a first test, have you wiped your
_builddirectory to make sure no lingering modules between dependency updates or so? Better yet have you tried fresh cloning into a new directory and building it there?EDIT: Yeah the only place I’m finding a
Collectableimplementation for Sql’sStreamis at:So the deps themselves look good. I’d definitely recommend trying to git clone it into a fresh directory and try it there next. Otherwise we might need to look at the project (which one of us can do in private if it’s not a public project if you want).
thehunmonkgroup
Ah, I had done “mix deps.clean --all” and “rm -rf assets/node_modules”, but not “rm -rf assets/_build”.
Removing _build and re-running the build process seems to have fixed the issue – good to know for the future!
Followup question: IIRC, Distillery uses stuff in _build when building upgrade releases, so if wiping _build becomes necessary, I guess that clobbers the option to do a hot upgrade?
OvermindDL1
Wiping
_buildis something that shouldn’t need to be done, but there is still a bug or two in mix left where it is required. I’ve especially noticed it on rare dependency updates like you’ve experienced it here too.You can actually backup the hot code reloading information if you so wish by backing up the
_build/prod/rel/<project-name>/releasesdirectory and restoring it. That directory holds the past release information. You can also copy it back in from where-ever you copied your release to, to restore it.