yos1p

yos1p

Running CLI app from escript.build throws error, unknown application :castore

I want to build a simple CLI app with Elixir, I’m using Mint and castore dependencies. Apparently, executing the app throws an error:

** (ArgumentError) unknown application: :castore
    (elixir 1.11.3) lib/application.ex:896: Application.app_dir/1
    (elixir 1.11.3) lib/application.ex:923: Application.app_dir/2
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:545: Mint.Core.Transport.SSL.add_cacerts/1
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:440: Mint.Core.Transport.SSL.add_verify_opts/2
    (mint 1.2.1) lib/mint/core/transport/ssl.ex:328: Mint.Core.Transport.SSL.connect/4
    (mint 1.2.1) lib/mint/negotiate.ex:67: Mint.Negotiate.connect_negotiate/4

Any solutions to fix this?

Marked As Solved

yos1p

yos1p

This is solved by using HTTPotion dependency. I think Mint is a little bit too complicated for simple HTTP client. Not sure why some dependencies don’t work with escript though.

Also Liked

heatmiser

heatmiser

escripts cannot access application priv/. See this castore issue here: not working from within escript · Issue #35 · elixir-mint/castore · GitHub

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31586 112
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement