deno
deno copied to clipboard
`--unstable` needed to generate Prisma client
I'm following along with the Deno + Prisma tutorial but it seems --unstable is needed or the client will not be generated. Maybe this can be updated in the tutorial?
deno run -A npm:prisma@^4.5 generate --data-proxy
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Unstable API 'node-api'. The --unstable flag must be provided.
deno run -A --unstable npm:prisma@^4.5 generate --data-proxy
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
napi_add_env_cleanup_hook is currently not supported
✔ Created ./package.json
added 2 packages, and audited 3 packages in 5s
found 0 vulnerabilities
added 2 packages, and audited 5 packages in 4s
found 0 vulnerabilities
✔ Installed the @prisma/client and prisma packages in your project
✔ Generated Prisma Client (4.6.1 | dataproxy) to .\generated\client in 446ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
/```
import { PrismaClient } from './generated/client'
const prisma = new PrismaClient()
/```
To use Prisma Client with Deno and the Data Proxy, import it like this:
/```
import { PrismaClient } from './generated/client/deno/edge.ts'
/```
You will need a Prisma Data Proxy connection string. See documentation: https://pris.ly/d/data-proxy
Warning: Not implemented: ChildProcess.prototype.disconnect
You need at least deno 1.28 version
I am on Deno 1.28.1
@lambtron please take a look
Same here
deno --version
deno 1.29.1 (release, x86_64-unknown-linux-gnu)
v8 10.9.194.5
typescript 4.9.4
Just a heads up: it will take some time before we decide to stabilize NAPI support, might happen in Q1/Q2 '23.