Build fails using adapter-vercel
See original GitHub issueDescribe the bug
I am working on updating one of my apps (from 367). Finally got it all working in pnpm dev
, so I go to build and… fail. I have been racking my brain but unfortunately I haven’t been able to pin down exactly why. It seems that it is something with the adapter itself, but obviously not all adapter-vercel builds are failing, so maybe it is something on my end. Ahh! 😕 Maybe this has been seen before and there is a known solution? 🤞🏻
The vite part of the build works fine, so pnpm preview
works, just not the final build. I have also tried building with adapter-node which worked as expected and even adapter-netlify which worked, although I did not deploy it.
Reproduction
Sorry, no repro. I have not been able to pin down exactly what is causing this. Feel free to close I guess but just frustrating since I deploy to vercel. I would just say it is obviously something on my end, but it is weird that adapter-node and adapter-netlify build successfully if that is the case.
Logs
error during build:
TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
at file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/@sveltejs+adapter-vercel@1.0.0-next.78/node_modules/@sveltejs/adapter-vercel/index.js:318:33
at Set.forEach (<anonymous>)
at create_function_bundle (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/@sveltejs+adapter-vercel@1.0.0-next.78/node_modules/@sveltejs/adapter-vercel/index.js:307:18)
at async generate_serverless_function (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/@sveltejs+adapter-vercel@1.0.0-next.78/node_modules/@sveltejs/adapter-vercel/index.js:153:5)
at async adapt (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/@sveltejs+adapter-vercel@1.0.0-next.78/node_modules/@sveltejs/adapter-vercel/index.js:235:5)
at async adapt (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.514_svelte@3.51.0+vite@3.1.7/node_modules/@sveltejs/kit/src/core/adapt/index.js:28:2)
at async Object.handler (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.514_svelte@3.51.0+vite@3.1.7/node_modules/@sveltejs/kit/src/exports/vite/index.js:488:6)
at async PluginDriver.hookParallel (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:22632:17)
at async Object.close (file:///Users/caleb/repos/[redacted]/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23709:13)
at async Promise.all (index 0)
ERROR Command failed with exit code 1.
System Info
System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Max
Memory: 1.45 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.0 - ~/.nodenv/versions/16.17.0/bin/node
Yarn: 1.22.15 - ~/.nodenv/shims/yarn
npm: 8.15.0 - ~/.nodenv/versions/16.17.0/bin/npm
Browsers:
Chrome: 106.0.5249.119
Firefox: 105.0.3
Safari: 16.0
npmPackages:
@sveltejs/adapter-netlify: ^1.0.0-next.80 => 1.0.0-next.80
@sveltejs/adapter-node: ^1.0.0-next.97 => 1.0.0-next.97
@sveltejs/adapter-vercel: ^1.0.0-next.78 => 1.0.0-next.78
@sveltejs/kit: ^1.0.0-next.514 => 1.0.0-next.514
svelte: ^3.51.0 => 3.51.0
vite: ^3.1.7 => 3.1.7
Severity
blocking all usage of SvelteKit
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:16 (8 by maintainers)
I created https://github.com/vercel/nft/issues/315 first because I think that’s the source of this issue
Yes, we left that in as a warning to notify people that something may not work - but if it does you can ignore it. It’s a warning, not an error, so the build succeeds.