adapter-vercel build fail - app.js missing
See original GitHub issueDescribe the bug
After upgrading packages project no longer builds with vercel adapter. Also tried with skeleton Sveltekit project, got the same output.
svelte.config.js
// import adapter from '@sveltejs/adapter-auto';
import vercel from '@sveltejs/adapter-vercel';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: vercel(),
// Override http methods in the Todo forms
methodOverride: {
allowed: ['PATCH', 'DELETE']
}
}
};
export default config;
app.js file doesn’t appear in the output folder.

Reproduction
https://github.com/vlntsolo/adapter-vercel-issue
Logs
Run npm run preview to preview your production build locally.
> Using @sveltejs/adapter-vercel
> .svelte-kit/vercel-tmp/entry.js:3:20: error: Could not resolve "../output/server/app.js"
3 │ import { App } from '../output/server/app.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
> Build failed with 1 error:
.svelte-kit/vercel-tmp/entry.js:3:20: error: Could not resolve "../output/server/app.js"
.svelte-kit/vercel-tmp/entry.js:3:20: error: Could not resolve "../output/server/app.js"
at failureErrorWithLog (/home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:1493:15)
at /home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:1151:28
at runOnEndCallbacks (/home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:1069:65)
at buildResponseToResult (/home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:1149:7)
at /home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:1258:14
at /home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:629:9
at handleIncomingPacket (/home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:726:9)
at Socket.readFromStdout (/home/valentine/dev/nous-test/node_modules/esbuild/lib/main.js:596:7)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
System Info
ubuntu 21.10
node v14.19.0
Severity
blocking an upgrade
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Cannot build with .node files and Vercel adapter #1547 - GitHub
Building works with adapter-node , and I'd assume Vercel supports .node files since Next.js uses the same sharp library.
Read more >Deploy SvelteKit App to Vercel, could not resolve install-fetch
It seems I was using an old adapter. npm install @sveltejs/adapter-auto@1.0.0-next.83 fixed it.
Read more >How do I resolve a 'module not found' error? - Vercel
This would mean that your repository is now syntactically incorrect, resulting in a build error when deploying the repository on the Vercel platform....
Read more >@sveltejs/adapter-static - npm
Adapter for SvelteKit apps that prerenders your entire site as a collection of static files. If you'd like to prerender only some pages, ......
Read more >Troubleshooting JSS Next.js apps - Sitecore Documentation
The most common cause of failed builds and apps that cannot render pages is an ... Error "XmlException: Root element is missing" in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

this should be fixed now, if you
npm i -D @sveltejs/adapter-auto@nextI am also encountering this issue on the latest sveltekit version. My temporary fix is to pin package versions in
package.jsonlike so, as those are the latest versions which I can see worked for me