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

2 years ago

You would need a build script, do you have one?


yash
HOBBYOP

2 years ago

No. I dont have one. Can you guide me? I dint see one in the railway template for svelte.



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

Are you able to share your repo?


yash
HOBBYOP

2 years ago


2 years ago

You weren't using the node adapter, I've made a PR to add that.

https://github.com/yashh/short/pull/1


yash
HOBBYOP

2 years ago

Thank you.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...