Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Prisma Singleton issue - Prisma
P
Prisma
•
4mo ago
•
11 replies
Donda
Prisma Singleton issue
I have a type issue I cant figure out why is happening
.
. im using the latest prisma v7
.
.
Path
: prisma
/schema
.prisma
schema
.prisma
:
generator client
{
provider
=
"prisma
-client
"
output
=
"
.
/generated
/prisma
"
}
Path
: prisma
.config
.ts
(project root level
)
import
'dotenv
/config
'
import type
{ PrismaConfig
} from
"prisma
"
;
import
{ env
} from
"prisma
/config
"
;
export default
{
schema
:
"prisma
/schema
.prisma
"
,
migrations
:
{
path
:
"prisma
/migrations
"
,
seed
:
'tsx prisma
/seed
-apps
.ts
'
,
}
,
datasource
:
{
url
: env
(
"DIRECT
_URL
"
)
,
/
/DATABASE
_URL
: pooled
, DIRECT
_URL
: direct Connection to the DB for Migrations
}
} satisfies PrismaConfig
;
Now the issue I have is this
: Expected 1 arguments
, but got 0
.ts
(2554
)
class
.ts
(73
, 5
)
: An argument for
'options
' was not provided
.
Error
(TS2554
)
|
Expected 1 arguments
, but got 0
.
on this file
:
/
/ lib
/prisma
.ts
:
import
{ PrismaClient
} from
"
@
/prisma
/generated
/prisma
/client
"
const globalForPrisma
= globalThis as unknown as
{ prisma
: PrismaClient
}
export const prisma
= globalForPrisma
.prisma
|
| new PrismaClient
(
)
if
(process
.env
.NODE
_ENV
!
=
=
"production
"
) globalForPrisma
.prisma
= prisma
here is the prisma folder tree
:
├
─ prisma
│
├
─ generated
│
│
└
─ prisma
│
│
├
─ browser
.ts
│
│
├
─ client
.ts
│
│
├
─ commonInputTypes
.ts
│
│
├
─ enums
.ts
│
│
├
─ internal
│
│
│
├
─ class
.ts
│
│
│
├
─ prismaNamespace
.ts
│
│
│
└
─ prismaNamespaceBrowser
.ts
│
│
├
─ models
│
│
└
─ models
.ts
│
├
─ migrations
│
│
├
─ 20251120140006
_added
_analytics
_for
_projects
│
│
│
└
─ migration
.sql
│
│
└
─ migration
_lock
.toml
│
├
─ schema
.prisma
│
└
─ seed
-apps
.ts
├
─ prisma
.config
.ts
Prisma
Join
The official Discord server of Prisma! Find us online at prisma.io
9,819
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Prisma Singleton in Next.js
P
Prisma / help-and-questions
16mo ago
Prisma Client Issue
P
Prisma / help-and-questions
2mo ago
Prisma Optimize Issue
P
Prisma / help-and-questions
14mo ago
Prisma pulse issue
P
Prisma / help-and-questions
14mo ago