The inferred type of 'auth' cannot be named without a reference to 'better-auth/node_modules/zod/v4/

Better-auth 1.3.4
10 Replies
iatomic.btc
iatomic.btc3mo ago
Bump also need help w this
Ping
Ping3mo ago
Hey guys, can you let me know if you have zod? and if so, is it version 4?
mcajongbah
mcajongbahOP3mo ago
Yes. Using zod v4
Ping
Ping3mo ago
Can you share your tsconfig?
mcajongbah
mcajongbahOP3mo ago
{
"include": ["src/**/*", "prisma/**/*", "../../packages/shared/src/**/*"],
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"verbatimModuleSyntax": true,
"strict": true,
"skipLibCheck": true,
"baseUrl": "./",
"rootDir": "../../",
"paths": {
"@/*": ["./src/*"],
"@shared/*": ["../../packages/shared/src/*"]
},
"outDir": "./dist",
"types": ["bun"],
"composite": true,
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
"tsc-alias": {
"resolveFullPaths": true
}
}
{
"include": ["src/**/*", "prisma/**/*", "../../packages/shared/src/**/*"],
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"verbatimModuleSyntax": true,
"strict": true,
"skipLibCheck": true,
"baseUrl": "./",
"rootDir": "../../",
"paths": {
"@/*": ["./src/*"],
"@shared/*": ["../../packages/shared/src/*"]
},
"outDir": "./dist",
"types": ["bun"],
"composite": true,
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
"tsc-alias": {
"resolveFullPaths": true
}
}
Ping
Ping3mo ago
It's most likely coming from composite, we require that to be false for Better-Auth to work for now.
ThallesComH
ThallesComH3mo ago
seems like that Zod is a must install dependency now, without it I get a ton of errors.
himanshu_942
himanshu_9423mo ago
@Ping I have composite false in my auth package still this error is coming. here is my tsconfig.json
{
"extends": "@task-dao/typescript-config/base.json",
"include": [
"src/**/*"
],
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"outDir": "./dist",
"esModuleInterop": true,
"composite": false
},
"exclude": [
"node_modules",
"dist"
]
}
{
"extends": "@task-dao/typescript-config/base.json",
"include": [
"src/**/*"
],
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"outDir": "./dist",
"esModuleInterop": true,
"composite": false
},
"exclude": [
"node_modules",
"dist"
]
}
---------- Note: I am using tsup to build the package and then I am using it in backend/frontend apps following monorepo arch.
Ping
Ping3mo ago
What's in the @task-dao/typescript-config/base.json?
LifeLineLogics
Any chance this will get fixed in the near future? I have a project with turborepo (monorepo) and it is standard practice to have composite as true

Did you find this page helpful?