deploying sveltekit app
yash
HOBBYOP
2 years ago
After reviewing the railway sveltekit template I realized that adding "start" command to package.json is the key.
Adding
"start": "node build"
results in
Error: Cannot find module '/app/build'
Whats the right way to run a sveltekit app with node-adapter?
8 Replies
yash
HOBBYOP
2 years ago
No. I dont have one. Can you guide me? I dint see one in the railway template for svelte.
2 years ago
The sveltekit template does have one -
https://github.com/railwayapp-templates/svelte-kit/blob/main/package.json#L6C3-L6C25
yash
HOBBYOP
2 years ago
Yup I do have that build line. However still encountering this error
> node build
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module '/app/build'
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.18.2```2 years ago
You weren't using the node adapter, I've made a PR to add that.
yash
HOBBYOP
2 years ago
Thank you.