Reputation: 723
I had the same problem config.kit.adapter should be an object with an "adapt" method and was able to fix it with
npm i @sveltejs/adapter-node@next
It would be nice to get the documentation up to date. But now there is a problem with "start".
npm run start
does not work anymore. A few weeks ago it was working. I get:
"svelte-kit preview" will now preview your production build locally. Note: it is not intended for production use
Ok, but how do I start my production node-server now?
Upvotes: 2
Views: 1424
Reputation: 669
After the code goes through adapter run the app with node ./build/index.js
command in production.
In case the index.js
is missing, the entrypoint for the app is different and the command above needs to be adjusted accordingly.
Upvotes: 3