Railway SvelteKit deploy doesn't match local configuration
I have a SvelteKit app that hosts a client project--a dashboard. The client sent me a static landing page to host on the same domain and project as the dashboard. The carousel--the main issue with the production deploy--works fine locally, as seen in the first image. However, in the production deploy, it looks different, as seen in the second image.
The landing page uses
slick
to provide the carousel, which has a dependance on jQuery. Here's the start of the +page.svelte file that serves the static page:
I've also verified that the network tab on both localhost & the production deploy match up, and they do. Additionally, I've also cleared my cache numerous times. I'm not sure where to head next29 Replies
Project ID:
508c7ca5-c96e-45d5-b72b-e1a3ffa14809
508c7ca5-c96e-45d5-b72b-e1a3ffa14809
send me link so I could check it?
https://rapidtrack.xyz/ <- production deploy
what node version are you using locally
v20.10.0
what version is railway building and running your app with
it uses the nixpacks default; so 18 i believe
welp get it using 20
engines.node
set to 20
ye 1m
tried through both package.json & the nixpacks env variable but no luck
what is the build on railway using now?
it's set to 20
right but what is the build using
node -r dotenv/config build
seems odd?it's for the sveltekit node adapter
but the
dotenv/config
part?not that its the issue, but you dont use dotenv on railway. so set your start command back to the default of
node build
have you ran npm run build && node build
locally?yeah i swapped the build command back
using
node build
locally opens the server just fine but the carousel is still brokenbroken locally?
yes
didnt you say it worked locally?
works using docker & vite locally
it might be the adapter then
so it wouldnt be broken anymore if you ran
vite dev
locally?let me see
yeah looks fine
not a railway issue, you know what that means 🙂
yeah
at least it was narrowed down
progress!