FG
๐Ÿ—„๏ธ DatabasesVercel

[6.x] WebAssembly.instantiate(): Import #0 "./query_compiler_bg.js": module is not an object or function]

Fresh7 months ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Bug description Nitro + Prisma 6.6.0 + D1 does not work Severity ๐Ÿšจ Critical: Data loss, app crash, security issue Reproduction https://github.com/medz/nitro-prisma-6.6 Expected vs. Actual Behavior Expected behavior: WASM modules can be parsed normally Frequency Consistently reproducible Does this occur in development or production? Only in development (e.g., CLI tools, migrations, Prisma Studio) Is this a regression? Prisma: 6.6.0 Nitro: 2.11.9 wrangler: 4.10.0 Workaround - Prisma Schema & Queries [code block] [code block] Logs & Debug Info [code block] Environment & Setup - OS: - Database: - Node.js version: Prisma Version [code block]

Error Output

Error: [unwasm] Failed to parse wasm/query_compiler_bg.sqlite-afbae85635953d66.wasm: Error: Internal failure: parseVec could not cast the value

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
84% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: [6.x] WebAssembly.instantiate(): Import #0 "./query_compiler_bg.js": module is not an object or function]

Low Risk

I was able to reproduce the error based on the reproduction repository: <img width="1117" alt="Image" src="https://github.com/user-attachments/assets/341161fa-30c5-4a1b-9163-02d41bee3f79" /> Interestingly, when I tried downgrading to version 6.5.0, I got this error as well: <img width="1117" alt="Image" src="https://github.com/user-attachments/assets/69384dfc-bb32-4a9b-9b7c-059df05c1de5" />

84

Trust Score

3 verifications

100% success
  1. 1

    I was able to reproduce the error based on the reproduction repository:

    I was able to reproduce the error based on the reproduction repository:

  2. 2

    <img width="1117" alt="Image" src="https://github.com/user-attachments/assets/34

    <img width="1117" alt="Image" src="https://github.com/user-attachments/assets/341161fa-30c5-4a1b-9163-02d41bee3f79" />

  3. 3

    Interestingly, when I tried downgrading to version 6.5.0, I got this error as we

    Interestingly, when I tried downgrading to version 6.5.0, I got this error as well:

  4. 4

    <img width="1117" alt="Image" src="https://github.com/user-attachments/assets/69

    <img width="1117" alt="Image" src="https://github.com/user-attachments/assets/69384dfc-bb32-4a9b-9b7c-059df05c1de5" />

Validation

Resolved in prisma/prisma GitHub issue #26880. Community reactions: 2 upvotes.

Verification Summary

Worked: 3
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

prismaormpostgresqlbug/2-confirmedkind/bugtopic:-d1topic:-generator-ts