Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using elixir-nodejs #78

Open
nitishymtpl opened this issue May 6, 2023 · 2 comments
Open

Using elixir-nodejs #78

nitishymtpl opened this issue May 6, 2023 · 2 comments

Comments

@nitishymtpl
Copy link

nitishymtpl commented May 6, 2023

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)

@ndrean
Copy link

ndrean commented Aug 27, 2023

yeah, good question. this repo is abandoned.

@francktchowa
Copy link

You should add NodeJS.Supervisor in your application.ex file in place of NodeJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants