💻💻How to deploy to vercel
Hi,
I am currently having troubles with deploying to Vercel, I am experiencing an error 404 NOT FOUND. I think i am using the wrong build command or the wrong default directory. Can someone please help?
Thanksyou!
Could you describe your build steps in a bit more details? I'm not familiar with vercel but maybe someone else can chime in or there's something missing in your deployment
Hi,
These are my deployment settings for the vercel. Thanks for helping:
has anybody tried to deploy repo this lately? I tried a few ways
1. With the node adapter (@sveltejs/adapter-node)
Without the @sveltejs/adapter-vercel and setting the Output directory to build, the index.js is just served as raw text when you navigate the website
2. With the vercel adapter (@sveltejs/adapter-vercel)
You get
A Serverless Function has exceeded the unzipped maximum size of 250 MB
the fn.func folder (not sure if this is the one that counts) is 193MB
2. With the vercel adapter (@sveltejs/adapter-vercel) + split: true option.
I tried setting in the svelte.config.js file this option:
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
split: true,
}),
This causes the build to fail after 44 mins and 32 mins!
Run npm run preview to preview your production build locally.
> Using @sveltejs/adapter-vercel
Warning: The following modules failed to locate dependencies that may (or may not) be required for your app to work:
node_modules/mongodb/lib/deps.js
- kerberos
- snappy
- @mongodb-js/zstd
...
node_modules/playwright-core/lib/server/registry/index.js
- browsers.json
✔ done
Build Completed in /vercel/output [11m]
Deploying outputs...
â–² Build system report
â–² To always completely log this report, add VERCEL_BUILD_SYSTEM_REPORT=1 as an Environment Variable to your project.
• At least one "Out of Memory" ("OOM") event was detected during the build.
• This occurs when processes or applications running during the build completely fill up the available memory (RAM) in the build container. When this happens, the build container terminates one of the processes during the build with a SIGKILL signal.
As the doc says: "If true, causes a route to be deployed as an individual function"
https://svelte.dev/docs/kit/adapter-vercel#Deployment-configuration
Vercel tutorial
This tutorial says that the Vercel adapter is not needed. https://vercel.com/docs/beginner-sveltekit/adapters
But the YouTube video was recorded 2 years ago, so I don't know how relevant is it
is anybody still facing this issue?