You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmodule Keila.Demos do
import NodeJS
def add_and_print do
result = NodeJS.call("echo", ["hello"]) #=> {:ok, "hello"}
IO.puts "The sum is #{result}"
end
end
But the error is coming as:
iex(1)> c("demos.ex")
== Compilation error in file demos.ex ==
** (CompileError) demos.ex:2: module NodeJS is not loaded and could not be found
Hi, I am having difficulty configuring elixir-nodeJS.
Here is what, I did in Application.ex.
%{
id: NodeJS,
start: {NodeJS, :start_link, [[path: "/workspace/lib/keila/JS", pool_size: 4]]}
}
In demos.ex
defmodule Keila.Demos do
import NodeJS
def add_and_print do
result = NodeJS.call("echo", ["hello"]) #=> {:ok, "hello"}
IO.puts "The sum is #{result}"
end
end
But the error is coming as:
iex(1)> c("demos.ex")
== Compilation error in file demos.ex ==
** (CompileError) demos.ex:2: module NodeJS is not loaded and could not be found
** (CompileError) compile error
(iex 1.14.4) lib/iex/helpers.ex:204: IEx.Helpers.c/2
iex:1: (file)
The text was updated successfully, but these errors were encountered: