R
Railway•4w ago
x4zx

Why node js not installed?

I have a code like this:
result = subprocess.run(
['node', './app/services/tiktok/urlebird/hash.js', video_url],
capture_output=True, text=True
)
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"]
}
}
}
}
}
{
"$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'
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.
Solution:
turn this off please
No description
Jump to solution
13 Replies
Percy
Percy•4w ago
Project ID: N/A
x4zx
x4zxOP•4w ago
N/A
x4zx
x4zxOP•4w 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"
[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
No description
Brody
Brody•4w ago
project id please
x4zx
x4zxOP•4w ago
f8cc6b6a-813b-4d34-b2f8-20c87fba3048
Brody
Brody•4w ago
what service
x4zx
x4zxOP•4w ago
instaviewApp
Brody
Brody•4w ago
send your railway.toml file please
x4zx
x4zxOP•4w ago
Solution
Brody
Brody•4w ago
turn this off please
No description
x4zx
x4zxOP•4w ago
No description
x4zx
x4zxOP•4w ago
🤩 thanks bro
Brody
Brody•4w ago
no problem
Want results from more Discord servers?
Add your server