Why node js not installed?

2 years ago

I have a code like this:

result = subprocess.run(
    ['node', './app/services/tiktok/urlebird/hash.js', video_url],
        capture_output=True, text=True
)

And also such a config, in the form of a railway.json file:

{
    "$schema": "https://schema.up.railway.app/railway.schema.json",
    "build": {
        "builder": "NIXPACKS",
        "nixpacksPlan": {
            "providers": ["python"],
            "phases": {
                "setup": {
                    "nixPkgs": ["...", "nodejs"]
                }
            }
        }
    }
}

But every time it comes to executing javascript code - I get this error:

Traceback (most recent call last):

  File "/opt/venv/lib/python3.11/site-packages/apscheduler/executors/base_py3.py", line 30, in run_coroutine_job

    retval = await job.func(*job.args, **job.kwargs)

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/app/services/tiktok/starter.py", line 22, in start

    medias = await UrleBird().get_user_medias(user)

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/app/services/tiktok/urlebird/crawler.py", line 67, in get_user_medias

    result = subprocess.run(

             ^^^^^^^^^^^^^^^

  File "/root/.nix-profile/lib/python3.11/subprocess.py", line 548, in run

    with Popen(*popenargs, **kwargs) as process:

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/root/.nix-profile/lib/python3.11/subprocess.py", line 1026, in __init__

    self._execute_child(args, executable, preexec_fn, close_fds,

  File "/root/.nix-profile/lib/python3.11/subprocess.py", line 1955, in _execute_child

    raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'node'

I tried installing node through the site by selecting it under Providers in the settings, now tried through the config file and failed again. Please tell me what the problem is.

Closed

14 Replies

2 years ago

N/A


2 years ago

Why node js not installed?


2 years ago

I tried this config:

[build]
builder = "nixpacks"
providers = ["python", "nodejs"]

[deploy]
startCommand = "uvicorn main:app --host \"0.0.0.0\" --port $PORT"
restartPolicyType = "never"

But there is not even a hint of installing node js

1300923240847507576


2 years ago

project id please


2 years ago

f8cc6b6a-813b-4d34-b2f8-20c87fba3048


2 years ago

what service


2 years ago

instaviewApp


2 years ago

send your railway.toml file please



2 years ago

turn this off please

1300924412266024971


2 years ago

1300924598384070747


2 years ago

🤩


2 years ago

thanks bro


2 years ago

no problem


Welcome!

Sign in to your Railway account to join the conversation.

Loading...