I’ve got a Elixir/Phoenix app that I just deployed to Fly. On my local machine I have a line of code that runs a node file like this:
{array_as_string, code1} = System.cmd("node", ["/app/assets/js/getTradingGameResult.js", Integer.to_string(current_price)])
and it works fine on local but on my Fly machine the “node” command is not available and I get the following error:
2024-03-24T04:47:32Z app[e286de6ae72208] waw [info]** (stop) :enoent
2024-03-24T04:47:32Z app[e286de6ae72208] waw [info] (elixir 1.15.6) lib/system.ex:1092: System.cmd("node", ["/app/assets/js/getTradingGameResult.js", "50000"], [])
iex(appname-01HSQCFQM7WPG41HDXQ362JTY0@fdaa:0:9cc8:a7b:c8:9efd:3144:2)4> System.find_executable("node")
nil
iex(appname-01HSQCFQM7WPG41HDXQ362JTY0@fdaa:0:9cc8:a7b:c8:9efd:3144:2)3> File.exists?("/app/assets/js/getTradingGameResult.js")
true
Node is installed on my Fly machine. I get the same error when trying to run the command in iex via fly ssh console
, How can I access the node command on Fly?