S
SolidJS7mo ago
ile

Getting Prisma TypeError in the browser console in a SolidStart app after doing build and start:

The error: TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../". I will work on reproducing this. Development build works.
2 Replies
bigmistqke
bigmistqke7mo ago
https://github.com/sveltejs/kit/issues/4444 this issue seems relevant to ur situation.
ile
ileOP7mo ago
Thanks I was reading those, I found similar, but they didn't help. I was able to fix it with this (that I found in one of those github issues). app.config.ts:
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
vite: {
ssr: {
external: ["@prisma/client"]
},
resolve: {
alias: {
".prisma/client/index-browser": "./node_modules/.prisma/client/index-browser.js"
}
}
}
});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
vite: {
ssr: {
external: ["@prisma/client"]
},
resolve: {
alias: {
".prisma/client/index-browser": "./node_modules/.prisma/client/index-browser.js"
}
}
}
});
Want results from more Discord servers?
Add your server