Dependency's dependencies not found in production

I have an app that is currently using xlsxir to parse excel files. Everything works fine in development, but when running in production, I get an error with module :erlsom is not available (one of xlsxir’s dependencies)

I haven’t had any issues with any other dependencies, but this is a mix task that is run via cron with quantum. I don’t think it’s an issue with quantum though, because I can connect via remote console & manually run the task, and still get the same error.

Is there anything obvious I might be missing here?

I’m using elixir v1.5.2 in both dev & prod, and using distillery v1.5.0 + edeliver v1.4.2 for deployment.

1 Like

It’s a bug in xlsxir - it uses the pre 1.4 definition for application and does not list erlsom as a runtime dependency

This can be fixed in xlsxir by either listing erlsom as a runtime dependency or migrating to automatic application inference introduced in elixir 1.4 (xlsxir declares it requires 1.4 anyway) and change applications to extra_applications in the snippet above.

To hotfix it in your application, you can add erlsom to extra_applications in your mix.exs.

2 Likes

Thanks! I sent a PR https://github.com/jsonkenl/xlsxir/pull/72

3 Likes