ukashazia
Persistent Builds Issue: Dependencies Recompiling Every Time
I’m currently working on an Elixir project using Visual Studio Code (VSCode) as my development environment. Unfortunately, I’ve encountered an issue with persistent builds and dependency compilation.
When I run mix commands in my project, it seems that Elixir recompiles all the dependencies every single time, making the development process slower than expected. However, I noticed that when I develop the same project within a Docker container, the dependencies are compiled only once, and subsequent mix commands are significantly faster.
I’ve already tried enabling persistent builds by setting the MIX_ENV environment variable to “dev” and running mix compile --persistent, but this doesn’t seem to resolve the issue.
Here’s what I’ve done so far:
- Set
MIX_ENVto “dev” both locally and within the Docker container. - Checked my Elixir version (I’m using the latest stable version).
- Cleaned the project using
mix clean. - Verified the
MIX_ENVvariable to ensure it is correctly set.
Unfortunately, none of these actions have made a difference, and I’m still facing the same problem. It’s puzzling that the behavior is different between my local environment and the Docker container.
Has anyone else experienced a similar issue with Elixir dependencies recompiling every time? I’d greatly appreciate any insights, suggestions, or tips on how to resolve this situation. Perhaps I’m missing something essential or there’s a configuration I need to adjust?
Marked As Solved
ukashazia
Solved: i solved the issue by running mix clean then mix setup when starting to work on a project. I don’t know the reason or why it happened or how it gets fixed but it works for me ![]()
Also Liked
dimitarvp
Last Post!
ukashazia
Popular in Questions
Other popular topics
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
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









