Deploy Phoenix/Elixir project issue: npm ERR! TypeError: Object.keys called on non-object

When you deploy you phoenix/elixir project on production and something goes wrong it is very useful to make a git clone of your project directly on production server and try to run it there via iex -S mix to see what’s wrong. This is actually no really good practice but one of the fastest options.

I also had something strange on my server and I cloned project there and when I run npm install to get all node packages for the brunch I realised that I’ve got wrong node version on prod:

As brunch work on node >= 4.0.0 we need to upgrade nodejs. I upgraded nodejs from v0.10.25 to v4.4.4 with this askubuntu post:

After this running iex -S mix phoenix.server was fine.

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).

I added nadia Telegram API Wrapper bleeding edge version from github (not good imho, but they had new cool code in the master) and I got this error message:

The hotfix for this issue is adding explicitly poison dependancy like this:

this means it takes max version of the poison and use over all the versions.

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:

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

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