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

Better-auth 1.3.4
9 Replies
iatomic.btc
iatomic.btc2mo ago
Bump also need help w this
Ping
Ping2mo ago
Hey guys, can you let me know if you have zod? and if so, is it version 4?
mcajongbah
mcajongbahOP2mo ago
Yes. Using zod v4
Ping
Ping2mo ago
Can you share your tsconfig?
mcajongbah
mcajongbahOP2mo 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
Ping2mo ago
It's most likely coming from composite, we require that to be false for Better-Auth to work for now.
ThallesComH
ThallesComH3w ago
seems like that Zod is a must install dependency now, without it I get a ton of errors.
himanshu_942
himanshu_9423w 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
Ping3w ago
What's in the @task-dao/typescript-config/base.json?

Did you find this page helpful?