16 days ago
✅ Logged in as EternalFlare#1350!
Stopping Container
npm error path /app
npm error command failed
npm error signal SIGTERM
npm error command sh -c node index.js
npm error A complete log of this run can be found in: /root/.npm/logs/2025-05-22T055831233Z-debug-0.log
im hosting a discord bot and even after this error shows the bot still responds to all my commands.
i dont know how to fix it
Id: 1bcd8ba5-264e-441e-9bc2-9f92d97130a8
0 Replies
16 days ago
Are these all the logs available? I’m assuming these are deploy logs
16 days ago
this is what happens when you start a node application via npm instead of using node directly, example -
if your current service start command is npm run start
and your start script is node index.js
simply replace your service start command with node index.js
{
"name": "flarebot",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node index.js",
"deploy": "node deploy-commands.js",
"post": "node post-commands.js"
},
"dependencies": {
"discord.js": "^14.19.3",
"dotenv": "^16.5.0",
"express": "^5.1.0",
"ms": "^2.1.3",
"winston": "^3.17.0"
},
"keywords": [],
"author": "",
"license": "MIT",
"description": ""
}
this has always been my package.json but i keep getting it
16 days ago
Brody is referring to your Railway start command. Under your service settings, change your start command to node index.js
You reached the start of the range → May 22, 2025 7:10 PM
[Region: us-east4]
==============
Using Nixpacks
==============
context: fr04-SUhq
╔════════ Nixpacks v1.38.0 ═══════╗
║ setup │ nodejs18, npm-9x ║
║─────────────────────────────────║
║ install │ npm ci ║
║─────────────────────────────────║
║ build │ node index.js ║
║─────────────────────────────────║
║ start │ npm run start ║
╚═════════════════════════════════╝
[internal] load build definition from Dockerfile
[internal] load build definition from Dockerfile
[internal] load build definition from Dockerfile ✔ 0ms
[internal] load build definition from Dockerfile
[internal] load build definition from Dockerfile ✔ 152ms
[internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1745885067
[internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1745885067 ✔ 351ms
[internal] load .dockerignore
[internal] load .dockerignore ✔ 0ms
[internal] load .dockerignore
[internal] load .dockerignore ✔ 11ms
[stage-0 10/10] COPY . /app
[stage-0 9/10] RUN printf '\nPATH=/app/node_modules/.bin:$PATH' >> /root/.profile
[stage-0 8/10] RUN --mount=type=cache,id=s/39069f22-854e-4377-b535-024720ad3f49-nodemodules/cache,target=/app/nodemodules/.cache node index.js
[stage-0 7/10] COPY . /app/.
[stage-0 6/10] RUN --mount=type=cache,id=s/39069f22-854e-4377-b535-024720ad3f49-/root/npm,target=/root/.npm npm ci
[stage-0 5/10] COPY . /app/.
[stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d
[stage-0 3/10] COPY .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix
[internal] load build context
[stage-0 2/10] WORKDIR /app/
[stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1745885067@sha256:d45c89d80e13d7ad0fd555b5130f22a866d9dd10e861f589932303ef2314c7de
[stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1745885067@sha256:d45c89d80e13d7ad0fd555b5130f22a866d9dd10e861f589932303ef2314c7de
[internal] load build context ✔ 0ms
[internal] load build context
[stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1745885067@sha256:d45c89d80e13d7ad0fd555b5130f22a866d9dd10e861f589932303ef2314c7de ✔ 8ms
[internal] load build context ✔ 13ms
[stage-0 2/10] WORKDIR /app/ ✔ 0ms – CACHED
[stage-0 3/10] COPY .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix ✔ 0ms – CACHED
[stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d ✔ 0ms – CACHED
[stage-0 5/10] COPY . /app/.
[stage-0 5/10] COPY . /app/. ✔ 2s
no ive got new probelm now index.js is running during building and making it build forever and causing it to time out crash.
[phases.setup]
nixPkgs = ["nodejs"]
[phases.install]
cmds = ["npm ci"]
[phases.build]
cmds = [] # <-- nothing runs during build!
[start]
cmd = "npm start"
this isnt fixing it either
16 days ago
you set the build command, you wanted to set the start command
oh nice guys it working now ty.
just had to create a new project cuz it wasnt taking the new build info