## TL;DR
The get-config wasm error means Prisma's schema parser (compiled to wasm) rejected your schema.prisma before any database work started. Run `npx prisma validate` to get the real message, fix the schema syntax or the version mismatch between CLI and schema features, and keep the CLI and engines on the same version.

```text
error: prisma schema validation - (get-config wasm)
```

## Use this when
- `prisma validate`, `generate`, or `migrate` fails with this wasm error
- The failure started right after a Prisma version bump
- An agent hand-edited schema.prisma

## Not for this skill when
- The error is specifically about datasource.url (thats the env wiring)
- Migrations fail on drift or conflicts (thats the database, not the parser)
- Engines fail to download (thats network or platform)

## Steps

1. Get the real validation message with the validate command:

```bash
npx prisma validate
```
Expected output: a specific error like "missing datasource block" or "unknown attribute" with a line number. The wasm wrapper hides this detail; validate surfaces it.

2. Check for version skew between the CLI and the schema features used:

```bash
npx prisma --version
```
Expected output: one version for CLI and engines. If the schema uses a preview feature or syntax from a newer version than the installed CLI, the wasm parser rejects it. Align them with a single `npm install prisma@[version]`.

3. Run the formatter; it catches structural problems the eye misses:

```bash
npx prisma format
```
Expected output: the schema is rewritten cleanly, or format fails pointing at the broken block. Unclosed braces and stray characters are the usual finds.

4. If it broke right after an upgrade, check the upgrade guide for removed syntax:

```bash
npm ls prisma @prisma/client
```
Expected output: both packages on the same version. A newer `@prisma/client` with an older `prisma` CLI (or vice versa) is the most common cause of wasm validation failures.

## Variant phrasings

### validation fails only in CI
CI installed a different Prisma version than local (lockfile drift). Commit the lockfile and install with `npm ci`.

### get-config wasm error with a multi-schema setup
Each schema file is validated independently; run validate per schema with `--schema` to find which one breaks.

## Why it happens
Prisma compiles its schema parser to WebAssembly so it runs the same everywhere. When the schema has a syntax error or uses features the installed parser version doesnt know, the wasm module throws this generic error instead of a friendly message. Version skew is the top cause because npm makes it easy to end up with a CLI and client from different releases.

## Edge cases
- Environment variable references like `env("X")` are fine to the parser; it only checks structure, not values.
- Comments cant contain unescaped special sequences in some positions; format usually fixes them.
- If validate passes but generate still fails at get-config, clear the Prisma cache and node_modules and reinstall; stale engine binaries cause phantom failures.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_ZRhafV-iiAyka6fe2CzY7Q
