Skip to content

fix(blob): use variable for vercel-blob dynamic import#810

Merged
atinux merged 1 commit intonuxt-hub:mainfrom
onmax:fix/multipart-upload-fs-driver
Mar 5, 2026
Merged

fix(blob): use variable for vercel-blob dynamic import#810
atinux merged 1 commit intonuxt-hub:mainfrom
onmax:fix/multipart-upload-fs-driver

Conversation

@onmax
Copy link
Copy Markdown
Contributor

@onmax onmax commented Jan 30, 2026

Closes #809

Summary

useMultipartUpload fails with fs driver because Vite statically analyzes import('@vercel/blob/client') at dev time. Fix uses variable indirection so Vite's es-module-lexer can't extract the specifier.

StackBlitz

Link Expected
Bug nuxthub-809 ❌ Dev fails
Fix nuxthub-809-fix ✅ Dev works

CLI Reproduction

git clone --depth 1 --filter=blob:none --sparse https://github.com/onmax/repros.git
cd repros && git sparse-checkout set nuxthub-809
cd nuxthub-809 && pnpm i && pnpm dev

Verify fix

git sparse-checkout add nuxthub-809-fix
cd ../nuxthub-809-fix && pnpm i && pnpm dev

The -fix folder uses pnpm patch to apply the fix locally.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 30, 2026

@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 30, 2026

npm i https://pkg.pr.new/@nuxthub/core@810

commit: bbd338c

@onmax onmax force-pushed the fix/multipart-upload-fs-driver branch from 2e83ac0 to ad74585 Compare January 30, 2026 10:16
@onmax onmax force-pushed the fix/multipart-upload-fs-driver branch from ad74585 to bbd338c Compare January 30, 2026 10:24
@alexcroox
Copy link
Copy Markdown

@atinux we are still unable to implement handleMultipartUpload with Cloudflare because of this. Could we get it merged?

@atinux atinux merged commit e490d7e into nuxt-hub:main Mar 5, 2026
7 of 9 checks passed
@atinux
Copy link
Copy Markdown
Contributor

atinux commented Mar 5, 2026

Thank you for the ping @alexcroox, missed it!

But you could use the pkr.pr release in the meantime

@alexcroox
Copy link
Copy Markdown

Thank you <3

@alexcroox
Copy link
Copy Markdown

I'm afraid this still didn't fix the issue. I've created a new issue and included a simple repro #859

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useMultipartUpload gives error when select fs

3 participants