R
Railway13mo ago
conr

Copy of Svelte/Vite Railway Template Fails

Get this error when node build tries to run. Error: Cannot find module '/app/build'
14 Replies
Percy
Percy13mo ago
Project ID: 0a95edc9-3898-4635-87b2-de7a8223688c
Brody
Brody13mo ago
please share your repo and your full build logs https://bookmarklets.up.railway.app/log-downloader/
conr
conrOP13mo ago
0a95edc9-3898-4635-87b2-de7a8223688c
conr
conrOP13mo ago
GitHub
GitHub - conrmahr/svelte-kit
Contribute to conrmahr/svelte-kit development by creating an account on GitHub.
conr
conrOP13mo ago
Project ID: 76337227-d15b-471d-96b7-7d912341682c
Brody
Brody13mo ago
will look into this a bit later
conr
conrOP13mo ago
I pretty sure it's something simple. I deployed the template and it ran fine, but I added a couple more routes in svelte, but didn't touch the build process and it errors out.
Brody
Brody13mo ago
in the mean time review your code for any changes you could have made that would effect this
conr
conrOP13mo ago
Ok got it working, but not sure why the template works without node -r dotenv/config build. https://kit.svelte.dev/docs/adapter-node#environment-variables
SvelteKit docs
Node servers • SvelteKit documentation
Brody
Brody13mo ago
why do you need dotenv on railway? the service variables are automatically injected into the environment
conr
conrOP13mo ago
I don't know, svelte docs just said use dotenv on production deployments.
Brody
Brody13mo ago
well if it works for you
conr
conrOP13mo ago
i also had to add a env var so let me try it without it.
Want results from more Discord servers?
Add your server