-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Deploying prisma to CloudFlare pages using Nuxt/Nitro and node-postgres (pg) is using the wrong(vercel) wasm path #23500
Copy link
Copy link
Closed
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: @prisma/adapter-pgtopic: Cloudflare Pagestopic: driverAdapterstopic: nuxt
Milestone
Description
Bug description
Deploying prisma to CloudFlare pages using Nuxt/Nitro and node-postgres (pg) seems to be using the wrong wasm path as if the current runtime has been detected as vercel.
It also happpens locally when using nitro with the cloudflare-pages present
Error:
Building Nuxt Nitro server (preset: cloudflare_pages) nitro 11:55:06 PM
[nitro 11:55:07 PM] ERROR Error: Could not load /Users/.../node_modules/.prisma/client/query_engine_bg.wasm?module (imported by node_modules/.prisma/client/wasm-edge-light-loader.js): ENOENT: no such file or directory, open '/Users/.../node_modules/.prisma/client/query_engine_bg.wasm?module'
How to reproduce
- Create a nuxt app with prisma
- Set the cloudflare preset nuxt.config.ts:
nitro: {
preset: 'cloudflare-pages'
},
- run
npx nuxi build
Expected behavior
Cloudflare is not detected as edge-light runtime and loads the correct wasm.
Prisma information
// Add your schema.prisma// Add your code using Prisma ClientEnvironment & setup
- OS: macOS
- Database: Postgre with adapter-pg
Prisma Version
5.11.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: @prisma/adapter-pgtopic: Cloudflare Pagestopic: driverAdapterstopic: nuxt