Language server error

I'm running Prisma 6.7.0 and I'm having a problem with the Languge Server, the prisma extension. The linter and everything have stopped working and it looks like it can't execute the prisma.config.ts file. Do anyone know more about this?
c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\lib\Schema.js:49
throw new Error(`Failed to import config file as TypeScript from "${resolvedPath}". Error: ${error.error.message}`);
^

Error: Failed to import config file as TypeScript from "c:\git\myApp\prisma.config.ts". Error:
You installed esbuild for another platform than the one you're currently using.
This won't work because esbuild is written with native code and needs to
install a platform-specific binary executable.

Specifically the "@esbuild/linux-x64" package is present but this platform
needs the "@esbuild/win32-x64" package instead. People often get into this
situation by installing esbuild on Windows or macOS and copying "node_modules"
into a Docker image that runs Linux, or by copying "node_modules" between
Windows and WSL environments.

(truncated rest of message)

at loadConfig (c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\lib\Schema.js:49:23)
at async PrismaSchema.load (c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\lib\Schema.js:76:24)
at async validateTextDocument (c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\server.js:152:24)
at async c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\server.js:159:9
c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\lib\Schema.js:49
throw new Error(`Failed to import config file as TypeScript from "${resolvedPath}". Error: ${error.error.message}`);
^

Error: Failed to import config file as TypeScript from "c:\git\myApp\prisma.config.ts". Error:
You installed esbuild for another platform than the one you're currently using.
This won't work because esbuild is written with native code and needs to
install a platform-specific binary executable.

Specifically the "@esbuild/linux-x64" package is present but this platform
needs the "@esbuild/win32-x64" package instead. People often get into this
situation by installing esbuild on Windows or macOS and copying "node_modules"
into a Docker image that runs Linux, or by copying "node_modules" between
Windows and WSL environments.

(truncated rest of message)

at loadConfig (c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\lib\Schema.js:49:23)
at async PrismaSchema.load (c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\lib\Schema.js:76:24)
at async validateTextDocument (c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\server.js:152:24)
at async c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\node_modules\@prisma\language-server\dist\server.js:159:9
this is my prisma.config.ts
import { defineConfig } from "prisma/config";

import { loadEnv } from "./src/common/env/loadEnv.ts";

loadEnv();

export default defineConfig({
earlyAccess: true,
schema: "./prisma",
});
import { defineConfig } from "prisma/config";

import { loadEnv } from "./src/common/env/loadEnv.ts";

loadEnv();

export default defineConfig({
earlyAccess: true,
schema: "./prisma",
});
9 Replies
Prisma AI Help
You chose to compile with the bot. One moment while I piece together your answer…
thehornta
thehorntaOP5w ago
It says I've installed an incompatible version of esbuild, but I'm not directly dependent on that in my package.json.
Prisma AI Help
I can see you're experiencing an issue with the Prisma Language Server in VS Code. This is a known issue related to platform-specific dependencies in the Prisma extension. The error message indicates that the extension has @esbuild/linux-x64 installed instead of @esbuild/win32-x64, which is needed for Windows. This exact issue was reported in a GitHub issue recently: Prisma Issue #26952 Workaround Based on the knowledge source, you can try this temporary fix: 1. Locate your VS Code extension folder (which appears to be at c:\Users\user\.vscode\extensions\prisma.prisma-6.7.0\) 2. Check if only @esbuild/linux-x64 exists in node_modules\@esbuild 3. Manually copy @esbuild/win32-x64 from another source into that folder The issue seems to occur specifically when using a prisma.config.ts file with the latest Prisma versions. The extension is incorrectly bundling Linux dependencies instead of Windows ones. This appears to be a bug in the Prisma extension itself, where it's not correctly detecting or installing the platform-specific dependencies for Windows environments. If the manual fix doesn't work, you might need to wait for an official fix from the Prisma team. You can follow the progress on the GitHub issue linked above.
Nurul
Nurul4w ago
Hi! Did the AI response help?
thehornta
thehorntaOP4w ago
Yes I saw the issue it linked in.
Prisma AI Help
✅ Great, thanks for letting us know that this solved your question!
thehornta
thehorntaOP4w ago
But whenever I will do something with .prisma in vscode I have to rename it to prisma.config.js but before I commit I'll change it back to prisma.config.ts 🙂 I hope it's resolved in 6.8.0
thehornta
thehorntaOP4w ago
There's a draft PR for it now: https://github.com/prisma/prisma/pull/27075
GitHub
fix(config): use jiti to load prisma.config.ts by nissy-dev · Pull...
Fix #26952 Fix prisma/language-tools#1825 Prisma is currently using esbuild to load prisma.config.ts, but in that case, the VSCode extension must distribute platform-specific binaries appropriately...
thehornta
thehorntaOP4w ago
Is the issue acknowledged in Prisma team?

Did you find this page helpful?