Can Kinda Find Prisma.Skip?
#29115
Replies: 1 comment 1 reply
-
|
Hi @ahmed33033! I am able to reproduce this. Do you mind creating a GitHub Issue to report this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
On VS Code, when I use
Prisma.Skip, I get the following typing error:Property 'Skip' does not exist on type 'typeof import("some_project/src/generated/prisma/internal/prismaNamespace")'.But... It still seems to work like normal. Just wanted to ask about it cause i thought the typing error was weird..
Here's what I import in my data fetching, .ts file:
import { PrismaClient, Prisma } from '@/generated/prisma/client'Check below for a reproduction of the error:
How to reproduce (optional)
It can be reproduced using the Prisma provided example: Simple TypeScript CRUD Example with Prisma Postgres
The steps can be summarized as follows:
Run the command:
npx try-prisma@latest --template orm/script --install npm --name scriptcd scriptRun
npx prisma generateto generate the prisma client(weirdly, I had to delete
prisma.config.tsbecause it was causing the error:Error: PrismaConfigEnvError: Missing required environment variable: DATABASE_URL. I even get the same error following the Prisma README.md).Import
Prismafrom'./prisma/generated/client'In line 17 of
script.ts, simply change the optionalnamefield to take:Prisma.Skip.Here's a snippet of the 2 changes for clarity:
Error: Now, you should see that VSCode highlights an error that:
Property 'Skip' does not exist on type 'typeof import("/home/some_dir/script/prisma/generated/internal/prismaNamespace")'.Let me know how I can better help!
Expected behavior (optional)
I expected no typing error on
Prisma.Skip, since it exists and seems to work like normal.Information about Prisma Schema, Client Queries and Environment (optional)
/package.json{ "name": "script", "license": "MIT", "scripts": { "dev": "tsx ./script.ts" }, "dependencies": { "@prisma/adapter-pg": "7.0.0", "@prisma/client": "7.0.0", "dotenv": "^16.4.7", "pg": "^8.16.3" }, "devDependencies": { "@types/node": "22.15.32", "prisma": "7.0.0", "tsx": "^4.20.6", "typescript": "5.8.2", "@types/pg": "^8.15.6" } }Beta Was this translation helpful? Give feedback.
All reactions