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.

Build fails using adapter-vercel

See original GitHub issue

Describe 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:closed
  • Created a year ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
dummdidummcommented, Oct 13, 2022

I created https://github.com/vercel/nft/issues/315 first because I think that’s the source of this issue

0reactions
dummdidummcommented, Oct 19, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[adapter-vercel] Build fails - path to bundle not being correctly ...
As expected this works fine on Ubuntu. Something to do with path.relative in the new builder API is not friendly to windows.
Read more >
Build fails with latest version of vite, vercel-adapter and sveltekit
Turns out this issue was caused because of the app.css file added by npx svelte-add@latest tailwindcss project used to add tailwind CSS to ......
Read more >
vercel-adapter build error : r/sveltejs - Reddit
i currently came across this error when i'm trying to build and deploy my app to vercel. ... This are the versions in...
Read more >
Adapters • Docs • SvelteKit
Adapters are small plugins that take the built app as input and generate output for deployment. By default, projects are configured to use...
Read more >
Learn How SvelteKit Works As a Framework - Joy of Code
If you run a build it's going to use Node by default but it's going to be ... Client-side rendering is less resilient...
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