Deps issue: (Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies

(Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies

I have faced the issue when you add new dependancy to your Elixir project and appeared it used different version of some deps (because developer fixed deps version).
Continue reading “Deps issue: (Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies”

cat: deps/exrm/mix.exs: No such file or directory on edeliver build host

During building my elixir app with edeliver (`mix edeliver build release`) have faced this error:

cat: deps/exrm/mix.exs: No such file or directory

Failed to detect exrm version.

Please set EXRM_VERSION_MAJOR, EXRM_VERSION_MINOR and EXRM_VERSION_PATCH
in the console or the config file.

Detected '' as major,
                 '' as minor
         and '' as patch version.

Please make sure you have `exrm` in your mix.exs deps:

  defp deps do
    [{:exrm, "~> 1.0.3"}]
  end

IMPORTANT! After you add this to the mix.exs run `mix deps.get`, commit the changes and run again `mix edeliver build release`

-sh: 12: Syntax error: “&” unexpected error when you build Elixir app with edeliver

This error looks like this:

-sh: 12: Syntax error: "&" unexpected
ssh -o ConnectTimeout=3 [email protected] 
set -e
    if [ ! -d /home/bots/apps/builds ]
    then
      mkdir -p /home/bots/apps/builds
      cd /home/bots/apps/builds
      git init &> /dev/null
      git config receive.denyCurrentBranch ignore
    else
      cd /home/bots/apps/builds
      git config receive.denyCurrentBranch ignore
    fi
   &> /dev/null$

This simple dummy error means that you have different shell on your build host.
I created a user “bot” on my DigitalOcean VPS and user’s shell was `sh` by default.
So I logged in to the build host and changed shell like `chsh /bin/bash`.
OR you can edit `/etc/passwd` file and change/append `/bin/bash` in the line where your user located.