fix(marketplace): 改用 node:sqlite 修复 Vercel 构建,移除原生 sqlite 依赖 - #8
Merged
Conversation
…e sqlite deps - content.experimental.nativeSqlite=true 让构建期本地 SQLite 走 Node 内置 node:sqlite,彻底摆脱 better-sqlite3 / sqlite3 的 node-gyp 原生编译 - 从 marketplace devDependencies 与根 pnpm-workspace onlyBuiltDependencies 移除 better-sqlite3 / sqlite3,更新 lockfile - engines.node>=22.5.0 保证 Vercel 构建容器支持 node:sqlite - README 补充 Vercel Root Directory / Blob Store 设置说明 Co-authored-by: multica-agent <github@multica.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 marketplace Vercel 部署:改用 Node 内置 node:sqlite
根因(本地实证纠正了原 Issue 的"死依赖"判断)
better-sqlite3/sqlite3不是死依赖——@nuxt/content在构建期通过db0连接器用它们生成本地 content SQLite dump(getLocalDatabase→db0/connectors/better-sqlite3)。直接删除会导致构建报错Could not locate the bindings file(这也是历史 commitf2478fa "allow native sqlite build"的由来)。修复
content.experimental.nativeSqlite: true:让构建期本地 SQLite 走 Node 内置node:sqlite,从根本上不再需要better-sqlite3/sqlite3的 node-gyp 原生编译。apps/marketplacedevDependencies 与根pnpm-workspace.yaml的onlyBuiltDependencies移除better-sqlite3/sqlite3,更新 lockfile。engines.node >= 22.5.0:保证 Vercel 构建容器具备node:sqlite。本地验证
pnpm install --frozen-lockfile✅,日志显示Ignored build scripts: ...better-sqlite3, ...sqlite3,无 node-gyp 编译。NITRO_PRESET=vercel STORAGE_DRIVER=vercelBlob pnpm --filter @aspect-mark/marketplace... build✅✨ Build complete!,产物apps/marketplace/.vercel/output,体积 12.8MB → 10.9MB。仍需人工在 Vercel 侧确认
apps/marketplaceBLOB_READ_WRITE_TOKEN)