Closed Sgiath closed 1 year ago
Having the same issue here :)
Can you please provide a way to reproduce it? How are you starting Phoenix? In which environment? It feels like you are running in development inside Docker?
That error was happening for us during mix tailwind.install
. It wasn't just the image, though, it was something I could also trigger locally.
We were running with Tailwind version 3.2.4 - after configuring Tailwind to use 3.3.2 instead the error went away.
Elixir/Erlang:
Erlang/OTP 26 [erts-14.0.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.15.0 (compiled with Erlang/OTP 26)
We are building our release inside a Docker container...
It uses this base image (hexpm/elixir:1.15.0-erlang-26.0.1-alpine-3.18.2
) and the dependency that is failing during compilation is tailwind.
In our build it fails exactly in the step it executes:
mix tailwind.install
with the stacktrace provided as:
#23 125.6 Generated phoenix_ecto app
#23 125.6
# [debug] Downloading tailwind from https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.2/tailwindcss-linux-x64
#23 125.6 ** (UndefinedFunctionError) function :http_util.timestamp/0 is undefined (module :http_util is not available)
#23 125.6 (inets 9.0.1) :http_util.timestamp()
#23 125.6 (inets 9.0.1) httpc.erl:750: :httpc.handle_request/9
#23 125.6 (tailwind 0.2.0) lib/tailwind.ex:289: Tailwind.fetch_body!/1
#23 125.6 (tailwind 0.2.0) lib/tailwind.ex:215: Tailwind.install/1
#23 125.6 (mix 1.15.0) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
#23 125.6 (mix 1.15.0) lib/mix/cli.ex:92: Mix.CLI.run_task/2
If you need more details happy to provide.
In our build it fails exactly in the step it executes: mix tailwind.install
This was the info I needed to reproduce it, thanks!
This also happens when running mix phx.gen.release --docker
using Elixir 1.15.0.
** (UndefinedFunctionError) function :http_util.timestamp/0 is undefined (module :http_util is not available)
(inets 8.3.1) :http_util.timestamp()
(inets 8.3.1) httpc.erl:749: :httpc.handle_request/9
(phoenix 1.7.6) lib/mix/tasks/phx.gen.release.ex:267: Mix.Tasks.Phx.Gen.Release.fetch_body!/1
(phoenix 1.7.6) lib/mix/tasks/phx.gen.release.ex:205: Mix.Tasks.Phx.Gen.Release.gen_docker/1
(phoenix 1.7.6) lib/mix/tasks/phx.gen.release.ex:76: Mix.Tasks.Phx.Gen.Release.run/1
(mix 1.15.0) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.15.0) lib/mix/cli.ex:92: Mix.CLI.run_task/2
You can use main and we shall have a new release soon. :)
When running tailwind in this docker image
hexpm/elixir:1.15.0-erlang-26.0.1-alpine-3.18.2
I get the following error:when I switch to
hexpm/elixir:1.14.5-erlang-26.0.1-alpine-3.18.2
it runs correctly as expected.