Closed ericlathrop closed 3 months ago
If I manually change https://github.com/phoenixframework/phoenix/blob/2920eb281ad78f06c3c5f3fd5afb02f175562172/installer/templates/phx_assets/tailwind.config.js#L36 to fix the path, I run into the #5414 issue, which still exists. If I edit config/config.exs
to fix that, then mix assets.build
runs successfully.
As per #5414, this is not a common scenario, so we don't plan to include this boilerplate out of the box for new apps. But thank you for documenting your steps, it can help others in the future. Just note it is MIX_DEPS_PATH and not MIX_ENV_PATH. :)
Environment
elixir:1.17.2-alpine
docker container)Context
I'm building a docker container to run my phoenix app in a dev environment. In the container I install the code at
/app
, which is a volume shared with my laptop so I can edit the code there. Also, I have a volume at/deps
where I want the deps installed, so I usedMIX_DEPS_PATH
to accomplish this. I want the deps to be in an isolated volume to prevent conflicts on the laptop.If I just put the volume at
/app/deps
, then if the laptop has installed deps those will get imported from the laptop into the volume just once at creation, and you get into a world of weird errors because they don't always update.So I use
MIX_DEPS_PATH
to make it work.Actual behavior
When running
mix assets.build
whileMIX_DEPS_PATH
is set outside of the app, you get this error:This is probably from this line: https://github.com/phoenixframework/phoenix/blob/2920eb281ad78f06c3c5f3fd5afb02f175562172/installer/templates/phx_assets/tailwind.config.js#L36 which doesn't seem to respect
MIX_ENV_PATH
.A similar issue was reported in #5414.
Expected behavior
I expect
mix assets.build
to work whenMIX_ENV_PATH
is set to a directory other than the usual path.