I'm getting errors when running Elixir files inside Atom IDE when a dependency is referenced in the script.
I'm using the Atom package "Script" to run the file.
Here's the code:
# This Elixir code runs fine when using Atom package "Script"
IO.puts "hello world"
When a dependency is referenced (NimbleCSV in this case) I get the error:
IO.puts "hello world"
NimbleCSV.define(MyParser, separator: "\t", escape: "\"")
** (UndefinedFunctionError) function NimbleCSV.define/2 is undefined (module NimbleCSV is not available) NimbleCSV.define(MyParser, [separator: "\t", escape: "\""]) (stdlib) erl_eval.erl:669: :erl_eval.do_apply/6 (elixir) lib/code.ex:168: Code.eval_string/3
When running the same file in Terminal using "mix run [filename]" the file runs without errors.
How do I configure Atom so that is recognizes the Elixir dependencies?
elixir -r <filename>
: github.com/rgbkrk/atom-script/blob/… It should check for the existence ofmix.exs
in any parent folder and runmix run <filename>
if it finds any. – Dogbert