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 next

0 Replies

508c7ca5-c96e-45d5-b72b-e1a3ffa14809


brody
EMPLOYEE

2 years ago

send me link so I could check it?


https://rapidtrack.xyz/ <- production deploy


brody
EMPLOYEE

2 years ago

what node version are you using locally


v20.10.0


brody
EMPLOYEE

2 years ago

what version is railway building and running your app with


it uses the nixpacks default; so 18 i believe


brody
EMPLOYEE

2 years ago

welp get it using 20


brody
EMPLOYEE

2 years ago

engines.node set to 20


ye 1m


tried through both package.json & the nixpacks env variable but no luck


brody
EMPLOYEE

2 years ago

what is the build on railway using now?


json "engines": { "node": "20" },


it's set to 20


brody
EMPLOYEE

2 years ago

right but what is the build using


```
╔════════════ Nixpacks v1.21.2 ════════════╗

║ setup │ nodejs20, npm-9x ║

║──────────────────────────────────────────║

║ install │ npm ci ║

║──────────────────────────────────────────║

║ build │ npm run build ║

║──────────────────────────────────────────║

║ start │ node -r dotenv/config build ║

╚══════════════════════════════════════════╝```


brody
EMPLOYEE

2 years ago

node -r dotenv/config build seems odd?


it's for the sveltekit node adapter


brody
EMPLOYEE

2 years ago

but the dotenv/config part?



brody
EMPLOYEE

2 years ago

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 broken


brody
EMPLOYEE

2 years ago

broken locally?


yes


brody
EMPLOYEE

2 years ago

didnt you say it worked locally?


works using docker & vite locally


it might be the adapter then


brody
EMPLOYEE

2 years ago

so it wouldnt be broken anymore if you ran vite dev locally?


let me see


yeah looks fine


brody
EMPLOYEE

2 years ago

not a railway issue, you know what that means 🙂


yeah


at least it was narrowed down


brody
EMPLOYEE

2 years ago

progress!


Loading...