fix: resolve the Prisma ORM 8 CLI from the nearest node_modules #2010
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 385 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.356
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2010"
general
weight: 0.35
SevInf
In a monorepo, Prisma ORM 8 language features did not work when
prismawas installed in a package (for exampleapps/api) and the monorepo root was opened in VS Code.Problem
The extension looked for the CLI only at
<workspace folder>/node_modules/prisma/dist/prisma.js.prismainstalled only inapps/api, no Prisma ORM 8 language server started, and VS Code reported "There is no formatter for 'prisma' files installed."prisma@latestwas installed at the workspace root and used forprisma lsp. When that version differed from the@prisma/orm-*packages inapps/api, loadingapps/api/prisma.config.tsfailed withPRISMA_CONFIG_LOAD_FAILED. The server still advertised formatting but returned no edits.Reproduced by driving
prisma lspover stdio in a pnpm monorepo with the schema atapps/api/src/prisma/contract.prisma:| CLI used for
prisma lsp|@prisma/orm-postgresinapps/api| Formatting result ||---|---|---|
| root,
8.0.0-rc.21|8.0.0-rc.12| no edits,PRISMA_CONFIG_LOAD_FAILED||
apps/api,8.0.0-rc.17, cwdapps/api|8.0.0-rc.12| formats correctly |Changes
node_modules/prismafrom the schema file's directory up to the workspace folder. The search does not go above the workspace folder.prisma lspwith the directory that contains the selectednode_modulesas its working directory, and scope the client's document selector to that directory.docs/language-server.md.PRISMA_CONFIG_LOAD_FAILEDdiagnostic. The diagnostic is attached toprisma.config.ts, so it was easy to miss while editing a schema. The notification names the config file and has two actions: "Open config", and "Show details", which reveals the language server's output channel where the server's error message is written. It is shown once per config file and failure message, and again if the failure clears and returns.Not covered
prisma@latestat the workspace root.prismais hoisted above it, the CLI is still not found.Validation
vitest run tests/__tests__inpackages/vscode: 55 tests pass, including six new monorepo resolution cases and twelve for the config load failure notification.tsc --noEmitandeslintpass forpackages/vscode.🤖 Generated with Claude Code