MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.34k stars 491 forks source link

Bridge failed to spawn JS process! Do you have Node.js 16 or newer installed? Get it at https://nodejs.org/ #129

Closed Intellouis closed 8 months ago

Intellouis commented 8 months ago

I used nodejs when installing the environment and package as it is in README.md. I had set up the environment variables properly, so that the program can call nodejs globally. I have successfully finished the configuration as it is in README.md. However, when I ran the code:

from voyager import Voyager

azure_login = {
    "client_id": "YOUR_CLIENT_ID",
    "redirect_url": "https://127.0.0.1/auth-response",
    "secret_value": "[OPTIONAL] YOUR_SECRET_VALUE",
    "version": "fabric-loader-0.14.18-1.19",
}

openai_api_key = "YOUR_API_KEY"

voyager = Voyager(
    mc_port = MY_MC_PORT,
    openai_api_key=openai_api_key,
    reset_placed_if_failed=True,
    action_agent_task_max_retries=100,
    action_agent_show_chat_log=False,
    curriculum_agent_mode="manual",
    critic_agent_mode="manual",
)

voyager.learn()

It told me that

--====--    --====--

Bridge failed to spawn JS process!

Do you have Node.js 16 or newer installed? Get it at https://nodejs.org/

--====--    --====--
Exception in thread Thread-8:

The whole traceback is:

Traceback (most recent call last):
  File "c:\Users\lenovo\.conda\envs\voyager\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "c:\Users\lenovo\.conda\envs\voyager\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "c:\Users\lenovo\.conda\envs\voyager\lib\site-packages\javascript\connection.py", line 137, in com_io
    raise e
  File "c:\Users\lenovo\.conda\envs\voyager\lib\site-packages\javascript\connection.py", line 125, in com_io
    proc = subprocess.Popen(
  File "c:\Users\lenovo\.conda\envs\voyager\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "c:\Users\lenovo\.conda\envs\voyager\lib\subprocess.py", line 1438, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified.

I wonder how to solve this problem.

Intellouis commented 8 months ago

Re-installing nodejs may solve this problem.