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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

@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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.