I'm trying to load a very large JSON file and bind it to a variable, here is my code that is failing.....
deps = File.open("../DepMap.json")
|> IO.read(:all)
|> JSX.decode
I'm getting back
** (FunctionClauseError) no function clause matching in :io.request/2
(stdlib) io.erl:556: :io.request({:error, :enoent}, {:get_line, :unicode, ""})
(elixir) lib/io.ex:82: IO.do_read_all/2
lib/depchecker.ex:6: (module)
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
What am I missing here? I'm assuming that the result of File.open gets passed as the first arguement to IO.read(:all) but this is the point of failure here and I'm not sure how to rectify this.