Hello everyone! So my builds suddenly stopped working, but I’m not sure why. It fails during mix deps.get in the dockerfile (which I find really odd). Here is the error message that I receive and here is the exact commit which caused it to fail.
* Getting phoenix (Hex package)
** (UndefinedFunctionError) undefined function: Mix.State.get/2 (module Mix.State is not available)
Mix.State.get(:debug, false)
(hex) lib/hex/shell.ex:22: Hex.Shell.debug/1
(hex) lib/hex/scm.ex:125: Hex.SCM.update/1
(hex) lib/hex/scm.ex:196: Hex.SCM.checkout/1
(mix) lib/mix/dep/fetcher.ex:64: Mix.Dep.Fetcher.do_fetch/3
(mix) lib/mix/dep/converger.ex:154: Mix.Dep.Converger.all/8
(mix) lib/mix/dep/converger.ex:47: Mix.Dep.Converger.converge/4
(mix) lib/mix/dep/fetcher.ex:16: Mix.Dep.Fetcher.all/3
The command "mix deps.get" failed and exited with 1 during .
I’m thinking it could be a number of potential things.
I removed the entire .elixir_ls folder from git (I read online that this is fine)
I used the Timex library inside of the xxx_web - view function. But that seems odd
What’s weird is that everything works 100% fine on local, it’s just failing during this step and I can’t find any information as to why.
Aside from that, I really can’t figure out why. Any help is greatly appreciated.
I don’t actually think it has anything to do with my code, and there might actually be a bug in the phoenix framework package? I’ve tried reverting the commit and I still get the same message, so I’m not sure. This is what my Dockerfile is, and I can’t imagine how my code is even involved at this point when mix deps.get is run.
Thanks for all your responses, I really appreciate it. I believe I already am building with a fresh docker cache as per the .travis.yml file with the --no-cache directive.
How would deleting the existing images help on the server jeremyjh, if the image is being built on travis? Like, how would I go about that, and isn’t that what --no-cache is doing anyway?
Wait, I’m just skimming through your travis logs, but Elixir 1.0.2? Is that correct? Is this really the version you want to run?
Because thats the big difference in the logs I see between the succesful build #206 and the first failing #207. Funnily enough, the travis.yml that I can see in the #207 commit is not different from that in the #206 commit.
Even worse… The log of #207 does not really match any travis.yml I coudld find…
Excellent. I’ve figured it out. Thank you so much for your help.
So I’ve done nothing wrong on my end (well, yes and no) but essentially I think travis CI might have actually changed something on their end in terms of how they interpret the .travis.yml file.
Initially I only specified the language, however I’ve now specified the version and everything is building again