2

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?

Martin Weissenboeck
  • 683
  • 3
  • 8
  • 22

1 Answers1

3

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.

phaleth
  • 569
  • 5
  • 7
  • @MartinWeissenboeck could you please post the comment and svelte.config.js file here. I'm also trying to get the production build and was not able to succeed. Also, you mentioned in another post that images were not loading in preview mode the same is happening for me even I didn't add static in the background url. Please help me – Sankar Jul 27 '21 at 12:59