a year ago
Having a bizzare issue of my deployed sveltekit app no longer serving the javascript for the site (standard js for opening dropdowns and stuff). The page loads fine, but indefinitely loads a hanging resource which never loads and then crashes the site.
The page has no error requests, and loads images that don't exist as 200 despite not content. No errors on railway logs.
Attempted to roll back to working branches, with the same issue persisting. Tried to delete and completely instantiate new instance but has the same issues.
Tried deploying on other services (digital ocean) and everything worked as expected.
141 Replies
Just had a hiccup of the javascript loading momentarily, but the static images did not load. I made an update to remove static image (use hosted elsewhere) and now the js is broken again.
When the JS was loading properly, was working on vivaldi but not chrome. On both i used incognito tabs with storage wiped.
Very bizzare, tricky to debug
heres a video demonstrating the issue of components that need javascript (days until counter in top left uses new Date, and the dropdown a simple state boolean)
also shows no failing requests or error logs, which makes it very challenging to debug.
And to reiterate, this problem did not occur on fresh install to digital ocean. And reverting to a working backup maintained the same problems. Including when making a brand new railway instance
(i work with jolly on this)
we had to migrate to digital ocean for now until this is fixed 😦
really would appreciate to be back on railway
a year ago
Hello!
Can I see a link to this site that is hosted on Railway please?
you'll the top left counter is "0" days and hamburger menu doesn't work on the top right
same branch/commit on https://oniondao.dev < hosted on digital ocean (DNS is still updating so you might get redirection to railway in some cases)
a year ago
deployed with the same dockerfile?
a year ago
on Railway you have a custom start command, are you also using that start command on DO?
one thing i thougth the error might be was we were initially on metal servers, switched to non metal servers, but still error persisted
a year ago
when i load the Railway hosted site im seeing 3 requests for JS files that are stuck pending
a year ago
well since removing the start command you are now running a dev server
a year ago
i dont think thats the direction we want to go in
ideally would use build + start command, but just trying to get it working
a year ago
The dockerfile uses bun, any change you are down to switch to that to Node?
a year ago
yes please
a year ago
i also put the start command back for you, it will be used on the next deploy you do
switching to nixpacks as builder instead of dockerfile should auto use node right?
a year ago
i cannot recommend nixpacks, but i can recommend Railpack
a year ago
you would need to delete or rename the Dockerfile to switch to either nixpacks or railpack
a year ago
but probably dont wanna do that since you said you have DO hooked up to the same repo?
a year ago
fair enough
like i really would prefer to get railway working, much prefer you guys to DO
a year ago
want to temporarily remove your bun lock file so that node and only node is used?
a year ago
probably with RAILPACK_INSTALL_CMD
https://railpack.com/config/file found it
a year ago
its a service variable, but if you prefer putting it in a config file you could do railpack.json
a year ago
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"commands": ["npm install --legacy-peer-deps"]
}
}
}a year ago
what did you end up putting in the railpack.json?
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"commands": ["npm install --legacy-peer-deps"]
},
"build": {
"commands": ["npm run build"]
},
"start": {
"commands": ["node build/index.js"]
}
},
"provider": "railway"
}a year ago
interesting approach, just use what i provided haha
a year ago
one sec
a year ago
ill have to raise this issue with railpack, but for now did you want to move back to a Dockerfile? -
FROM node:22-slim
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
ENV NPM_CONFIG_FUND=false
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
COPY . ./
RUN npm run build
ENTRYPOINT ["node", "build/index.js"]a year ago
updated the Dockerfile
a year ago
how was bun coping with the dep conflict?
a year ago
well you still need it haha
a year ago
no, its a hidden error, you are missing a package-lock.json file
a year ago
i've updated Dockerfile
a year ago
okay the 3d onion is bouncing
a year ago
we need to do one more test to rule that out
a year ago
can you give me your original dockerfile?
FROM oven/bun:latest
COPY . /app
WORKDIR /app
RUN bun install
RUN bun run build
EXPOSE 4173
CMD ["bun", "run", "preview", "--host"]this is the editted one i was trying
a year ago
that one is fine, i have a theory, when you where using that bun Dockerfile, you still had the railway start command set to use node, thus you built with bun, but never ran with bun, I'm going to modify that dockerfile to also run with bun
i think this was the one before i started editting:
FROM oven/bun:1.2
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json ./
# Copy the original package.json back
COPY package.json ./
# Install all dependencies
RUN bun install --no-production
# Copy application code
COPY . .
# Build the application
RUN bun run build
# Expose the port
EXPOSE 3000
ENV PORT=3000
ENV HOST=0.0.0.0
# Start the application
CMD ["node", "build/index.js"]a year ago
bring your bun lockfile back and try this simple dockerfile -
FROM oven/bun:latest
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install
COPY . ./
RUN bun run build
CMD ["bun", "build/index.js"]a year ago
"/bun.lockb": not found
a year ago
ah text based lock file, i've also updated the Dockerfile
a year ago
also, pro tip, click the view in context button
a year ago
what is three-perf?
a year ago
we love when packages run git clones, the node ecosystem is lovely
a year ago
the only savior is go
a year ago
i dont think so, i say just try to redeploy
a year ago
was worth a shot
a year ago
back to node it is
a year ago
yeah
a year ago
good old node
fwiw, we have two other services running with bun with no issue (back end services though)
like we had the front end service running with bun up til yesterday when it suddenly stopped serving files
a year ago
i think you had it running with node technically, given your start command
a year ago
bun is a mystery
a year ago
sounds good, glad i could help
a year ago
diffrent container runtime?, who really knows
a year ago
interesting




