question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

404 Error when deploying to Vercel

See original GitHub issue

Describe the bug

With the new API changes that were done (https://github.com/sveltejs/kit/pull/3133), the new output folder is ‘.output’ instead of ‘.vercel_build_output’ and Vercel doesn’t seem to know what to do with that.

I have the preset set to Sveltekit and had to do a manual override on the output folder to ‘.vercel_build_output’ for it to work. Now, I followed the Vercel guide for the file system api (https://vercel.com/docs/file-system-api), and my deployments just go to a 404 page. I also added the manual output override to ‘.output’ but the deployments fail if I do that.

I understand that this might be a Vercel thing instead of SvelteKit. If so, then let me know and I will head over there.

Thanks.

Reproduction

I don’t have a public repo available, sorry.

Logs

No response

System Info

System:
    OS: macOS 12.1
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 100.13 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - /usr/local/bin/node
    npm: 7.17.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 96.0.4664.110
    Edge: 96.0.1054.62
    Firefox Developer Edition: 96.0
    Safari: 15.2
  npmPackages:
    @sveltejs/adapter-vercel: next => 1.0.0-next.33 
    @sveltejs/kit: ^1.0.0-next.114 => 1.0.0-next.208 
    svelte: ^3.34.0 => 3.44.3

Severity

blocking an upgrade

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Rich-Harriscommented, Dec 30, 2021

same issue as #3143, closing (even though this was first 😃

0reactions
hemanthvalsarajcommented, Jan 12, 2022

This ain’t working for me either. Am I missing something here?

package.json { "@sveltejs/adapter-vercel": "next", "@sveltejs/kit": "next", "svelte": "^3.44.0", "svelte-preprocess": "^4.10.1", }

Error Log on Vercel `

Using @sveltejs/adapter-vercel Cannot read property ‘location’ of undefined at get_single_valued_header (file:///vercel/path0/node_modules/@sveltejs/kit/dist/chunks/url.js:8:23) at visit (file:///vercel/path0/node_modules/@sveltejs/kit/dist/chunks/index5.js:436:22) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Command “yarn run build” exited with 1 `

Read more comments on GitHub >

github_iconTop Results From Across the Web

NextJS deployed to Vercel: 404 page not found - Stack Overflow
My assumption is that the error is caused by the dynamic route but I can't find my mistake. Also, no page is working...
Read more >
Custom 404 Page – Vercel Docs
If you need to assign a different file as the custom 404 page, you can add a vercel.json file with routes . ......
Read more >
Deployment issue with Vercel - Frontity Community Forum
And the 404 error is returned by Vercel because they don't recognize that subdomain. Is the domain in vercel correctly set up? https://vercel....
Read more >
404 Error when deploying on vercel · Issue #69 - GitHub
Hi, I encounter the 404 error when I deploy this to vercel. Here is the repo: https://github.com/PatelN123/prod/tree/main/platforms Thanks.
Read more >
404 Error on refreshing sub-page after deploying to vercel
I built a note-taking app with help from a youtube video and published it to Vercel. Everything works fine except that when I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found