sveltejs / kit

web development, streamlined
https://kit.svelte.dev
MIT License
17.8k stars 1.78k forks source link

My SvelteKit Application that uses Prisma JS throws this error in Production: `TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../".` which is hosted on Vercel. #12147

Closed Maximinodotpy closed 2 weeks ago

Maximinodotpy commented 3 weeks ago

Describe the bug

My SvelteKit Application that uses Prisma JS throws this error in Production: TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../". which is hosted on Vercel.

This will make it so the page does not work at all. It's located here https://quuli.ch

image

Reproduction

I am working in this Repository and the Error appeared in between and after these two commits: https://github.com/Maximinodotpy/quuli-new/commit/dc0a8e47a385b5f9352530bafdd8e0079104ce46 and https://github.com/Maximinodotpy/quuli-new/commit/e5bcbf041ec32026da097df901427502f20efdbb

Logs

TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../".
handleError @ app.BQZxAhim.js:2
C @ entry.BZbKWuDM.js:1
tn @ entry.BZbKWuDM.js:1
await in tn (async)
rn @ entry.BZbKWuDM.js:1
(anonymous) @ (index):35
Promise.then (async)
(anonymous) @ (index):34
www.quuli.ch/:1  Uncaught (in promise) TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../".
Promise.catch (async)
m @ app.BQZxAhim.js:2
(anonymous) @ app.BQZxAhim.js:2
rn @ entry.BZbKWuDM.js:1
(anonymous) @ (index):35
Promise.then (async)
(anonymous) @ (index):34
entry.BZbKWuDM.js:1  Uncaught (in promise) TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../".

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P
    Memory: 18.75 GB / 31.64 GB
  Binaries:
    Node: 20.12.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.5 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.2.0
    @sveltejs/kit: ^2.0.0 => 2.5.7
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.1.0
    svelte: ^4.2.7 => 4.2.15
    vite: ^5.0.3 => 5.2.10

Severity

blocking all usage of SvelteKit

Additional Information

Thank you very much for your time, friends!!!

nagyszem22 commented 3 weeks ago

I've got the same error

gterras commented 3 weeks ago

Hi,

Reproductions must be short, self-contained and correct and must not contain files or code that aren't relevant to the issue — please do NOT just paste a link to your project.

For coding issues please consider opening a discussion. Here your @prisma alias .prisma/client/index-browser is invalid as pretty clearly stated in the error message you pasted.