Skip to content

Vercel Adapter doesn't bundle @libsql/client #9936

@binyamin

Description

@binyamin

Astro Info

Astro                    v4.3.0
Node                     v20.9.0
System                   Linux (x64)
Package Manager          pnpm
Output                   server
Adapter                  @astrojs/vercel/serverless
Integrations             @astrojs/solid-js
which: no xclip in (./node_modules/.bin:/home/binyamin/.turso:/home/binyamin/.local/share/pnpm:/home/binyamin/.cargo/bin:/home/binyamin/.bun/bin:/home/binyamin/.deno/bin:/run/user/1000/fnm_multishells/3534986_1706800354736/bin:/home/binyamin/.local/share/fnm:/home/binyamin/.local/share/zinit/polaris/bin:/home/binyamin/.local/bin:/home/binyamin/bin:/home/binyamin/.local/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/home/binyamin/go/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/var/lib/snapd/snap/bin:/usr/local/go/bin)

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When a project uses the @astrojs/vercel/serverless as an adapter, the module @libsql/client will never be bundled. This is hardcoded in src/lib/nft.ts. This behavior is not noted in the docs, and there's no warning from the CLI. The serverless function just fails.

The only hint to this is that the .vercel/output folder contains a broken symlink in the node_modules for @libsql/client.

What's the expected result?

The function should bundle appropriately. I can see from the code that it ignores @libsql/client for a reason. I don't understand the reason, but I am willing to brainstorm for a different solution.

Note: The reproduction on stackblitz will probably be useless, since stackblitz doesn't show the .vercel folder. See the source file instead.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-4vea6g

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

needs responseIssue needs response from OP

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions