the relevant error from the failed deploy:
Starting Container
/app/node_modules/esbuild/lib/main.js:2150
throw reject;
^
Error: The service was stopped
at /app/node_modules/esbuild/lib/main.js:969:34
…
Error: Command failed: node build
at build (/app/pokemon-showdown:30:27)
at Object.<anonymous> (/app/pokemon-showdown:143:2)
status: 1
To fix this, please update the template as follows:
Remove the node build step entirely
at package.json
"scripts": {
"start": "node server.js"
}
At Dockerfile:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 8080
CMD ["npm", "start"]
and then server.js (entrypoint):
const PORT = parseInt(process.env.PORT, 10) || 8000;
server.listen(PORT, () => console.log(`Listening on ${PORT}`));
With these changes, Railway will skip the failing build step and start the Pokemon Showdown server directly.