2 years ago
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
35 Replies
2 years ago
508c7ca5-c96e-45d5-b72b-e1a3ffa14809
2 years ago
send me link so I could check it?
2 years ago
https://rapidtrack.xyz/ <- production deploy
2 years ago
what node version are you using locally
2 years ago
v20.10.0
2 years ago
what version is railway building and running your app with
2 years ago
it uses the nixpacks default; so 18 i believe
2 years ago
welp get it using 20
2 years ago
engines.node set to 20
2 years ago
ye 1m
2 years ago
tried through both package.json & the nixpacks env variable but no luck
2 years ago
what is the build on railway using now?
2 years ago
json "engines": { "node": "20" },
2 years ago
it's set to 20
2 years ago
right but what is the build using
2 years ago
```
╔════════════ Nixpacks v1.21.2 ════════════╗
║ setup │ nodejs20, npm-9x ║
║──────────────────────────────────────────║
║ install │ npm ci ║
║──────────────────────────────────────────║
║ build │ npm run build ║
║──────────────────────────────────────────║
║ start │ node -r dotenv/config build ║
╚══════════════════════════════════════════╝```
2 years ago
node -r dotenv/config build seems odd?
2 years ago
it's for the sveltekit node adapter
2 years ago
but the dotenv/config part?
2 years ago

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?
2 years ago
yeah i swapped the build command back
2 years ago
using node build locally opens the server just fine but the carousel is still broken
2 years ago
broken locally?
2 years ago
yes
2 years ago
didnt you say it worked locally?
2 years ago
works using docker & vite locally
2 years ago
it might be the adapter then
2 years ago
so it wouldnt be broken anymore if you ran vite dev locally?
2 years ago
let me see
2 years ago
yeah looks fine
2 years ago
not a railway issue, you know what that means 🙂
2 years ago
yeah
2 years ago
at least it was narrowed down
2 years ago
progress!