My netlify site name: mellifluous-cranachan-5857d5.netlify.app
Build problems? Link or paste the FULL build log & build settings screenshot
My basic SvelteKit deployment does not work.
Once deployed Netlify, I go to my url and just get a 404 page:
SvelteKit claims to have a supported adapter-netlify
that automatically creates and configures a Netlify app. But nothing I have tried so far works.
What I’ve done so far:
All I did was follow the “see for yourself” instructions at https://kit.svelte.dev/ to create a basic SvelteKit Demo site, and pushed it to GitHub.
Without editing the code I connected my GitHub account and let Netlify auto-detect the right config.
The site “deployed” successfully but there was no page to be found. (see above screenshot)
SO THEN:
I added the followed the instructions at SvelteKit on Netlify | Netlify Docs
added the @sveltejs/adapter-netlify
package, configured it in the svelte.config.js
import adapter from '@sveltejs/adapter-netlify';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
adapter: adapter()
}
};
export default config;
deployed and… Page Not Found. (See above screenshot)
SO THEN:
I tried using the netlify-cli, ran netlify dev
in the root, and low and behold the page rendered on port 8888
BUT… The Sverdle example page still failed on an API request to http://localhost:8888/sverdle?/enter
but it was still better than the deployed site was doing.
SO THEN:
I noticed it was building a .netlify
directory, so I went into my Deploy Settings > Build settings and changed the Publish directory
from .svelte-kit
to .netlify
, triggered a new deploy, and though it seemed to deploy with no errors I still saw: Page Not Found (see screenshot above)
It’s possible I’ve done something wrong, if so let me know, but I am concerned with the SvelteKit 1.0 release that many others will be trying SvelteKit on Netlify, having a similar experience to mine, and just going somewhere else instead.
My netlify site name: mellifluous-cranachan-5857d5.netlify.app
My GitHub Repo: GitHub - BigAB/testing-netlify: This is just to test SvelteKits netlify adapter
Let me know if you have any thoughts.