NuxtN
Nuxt5mo ago
8 replies
kora

✘ [ERROR] Could not resolve ".prisma/client/index-browser"

When i start my app and following the @prisma/nuxt tutorial i got this error

[ERROR] Could not resolve ".prisma/client/index-browser"

node_modules/.pnpm/@prisma+client@6.15.0_prisma@6.15.0_magicast@0.3.5_typescript@5.9.2typescript@5.9.2/node_modules/@prisma/client/index-browser.js:1:23:
1 │ const prisma = require('.prisma/client/index-browser')
~~~~~~

You can mark the path ".prisma/client/index-browser" as external to exclude it from the bundle,
which will remove this error and leave the unresolved path in the bundle. You can also surround
this "require" call with a try/catch block to handle this failure at run-time instead of
bundle-time.


ERROR [unhandledRejection] Error during dependency optimization: 3:37:49 PM

[ERROR] Could not resolve ".prisma/client/index-browser"

node_modules/.pnpm/@prisma+client@6.15.0_prisma@6.15.0_magicast@0.3.5_typescript@5.9.2
typescript@5.9.2/node_modules/@prisma/client/index-browser.js:1:23:
1 │ const prisma = require('.prisma/client/index-browser')
~~~~~~

You can mark the path ".prisma/client/index-browser" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.



at failureErrorWithLog (node_modules/.pnpm/esbuild@0.25.9/node_modules/esbuild/lib/main.js:1467:15)
at node_modules/.pnpm/esbuild@0.25.9/node_modules/esbuild/lib/main.js:926:25
at node_modules/.pnpm/esbuild@0.25.9/node_modules/esbuild/lib/main.js:1345:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

and i don't know how to fix them?
Was this page helpful?