app deploy fails packaging @prisma/adapter-pg in a pnpm monorepo (ENOENT realpath /tmp/node_modules/...)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- next.js, typescript
- Ambito
- build-system, cli
Direzione di ricerca
Start with the packaging path in dist/lib/app/app-provider.js around deployApp line 186, then trace its callers through dist/controllers/app.js and reproduce with the documented app deploy command. Done means the local packaging step completes without ENOENT for @prisma/adapter-pg and deployment works with both hoisted and isolated pnpm linkers.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
app deploy fails during local build packaging for a Next.js app in a pnpm monorepo that depends on @prisma/adapter-pg, with:
ENOENT: no such file or directory, realpath '/tmp/node_modules/.pnpm/@prisma+adapter-pg@7.8.0/node_modules/@prisma/adapter-pg'
Reproduced identically on 3.0.0-beta.28 (the latest npm tag) and 3.0.0-dev.129.1 (the newest available dev build as of 2026-07-17), via both bunx @prisma/cli@latest and a directly pnpm add-installed @prisma/cli binary (ruling out bunx caching as a cause).
Environment
- pnpm workspace monorepo, Next.js 16.2.10 (Turbopack) app as the deploy target
- App depends on
@prisma/adapter-pg(driver adapter), marked innext.config.ts'sserverExternalPackages(so Next does not bundle it — standard practice for native/runtime-only packages) - Tested with pnpm's
node-linkerset to bothhoistedandisolated— the exact failure differs by linker mode (see below), but a working deploy was never achieved in either mode pnpm run build(a plain, non-Compute-CLI invocation) succeeds fully in both linker modes once the app's own dependency graph is otherwise correct — this is specifically aprisma-cli app deploypackaging-step failure, not a Next.js build failure
Steps to reproduce (minimal shape)
- A pnpm monorepo with
node-linker=hoistedin.npmrc - An app package that depends on
@prisma/adapter-pg, withnext.config.ts'sserverExternalPackages: ["@prisma/adapter-pg", "pg"] prisma-cli project link <project-id>from the app directoryprisma-cli app deploy --project <project-id> --branch main --framework nextjs --yes
Observed behavior
- Under
node-linker=hoisted:next build(run directly) succeeds.prisma-cli app deploy's local build step fails withENOENT: no such file or directory, realpath '/tmp/node_modules/@prisma/adapter-pg'— a bare/tmp/node_modules/...path, one directory level shallower than where the actual staging appears to happen, suggesting an off-by-one in the temp-directory path used during artifact-symlink materialization. - Under
node-linker=isolated(the standard pnpm virtual-store layout): once the app's own build succeeds cleanly (confirmed via directpnpm run build),app deployfails with a more specific variant:ENOENT: no such file or directory, realpath '/tmp/node_modules/.pnpm/@prisma+adapter-pg@7.8.0/node_modules/@prisma/adapter-pg'— again missing the actual staging-directory path segment beforenode_modules.
What I ruled out
bunx's own caching/wrapper behavior — reproduced identically via a directlypnpm add -D @prisma/cli-installed binary invoked withoutbunxat all.- Turbopack/Next.js workspace-root inference — a separate, real issue was found and fixed on the app side (pinning
turbopack.root), but the packaging-step failure above persists with or without that fix, in both linker modes. - Missing/stale build artifacts in the monorepo — confirmed via a clean checkout in a separate git worktree, with dependencies freshly installed, that the app itself builds successfully; only
app deploy's own post-build packaging step fails.
Trace
Error: ENOENT: no such file or directory, realpath '/tmp/node_modules/@prisma/adapter-pg'
at Object.deployApp (file:///tmp/bunx-.../node_modules/@prisma/cli/dist/lib/app/app-provider.js:186:36)
at async runSingleAppDeploy (file:///tmp/bunx-.../node_modules/@prisma/cli/dist/controllers/app.js:357:23)
at async runCommand (file:///tmp/bunx-.../node_modules/@prisma/cli/dist/shell/command-runner.js:27:50)
at async Command.<anonymous> (file:///tmp/bunx-.../node_modules/@prisma/cli/dist/commands/app/index.js:85:3)
Happy to provide more detail or a minimal reproduction repo if useful.
- Lingua principale
- TypeScript
- Stelle
- 21
- Fork
- 2
- Merge medio
- 23h 23m
- PR unite (30g)
- 40
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di prisma/prisma-cli
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
prisma/prisma-cli#252 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
prisma/prisma-cli#246 ·
-
installation issue Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
prisma/prisma-cli#237 · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
prisma/prisma-cli#205 · 3 commenti ·
Tutte le issue di prisma/prisma-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
danielmiessler/LifeOS#2218 ·