TurboRepo: Prisma-Kysely Generator

Weirdest thing: It worked before, and all of a sudden it doesn't. I switched to using prisma-client-js and switch it back to prisma-kysely, then it didn't work. Error log:
@thing/db:db:generate: [Error: ENOENT: no such file or directory, open '/Users/me/WorkDir/RepoName/thing/db/types.ts'] {
@thing/db:db:generate: errno: -2,
@thing/db:db:generate: code: 'ENOENT',
@thing/db:db:generate: syscall: 'open',
@thing/db:db:generate: path: '/Users/me/WorkDir/RepoName/packages/db/types.ts'
@thing/db:db:generate: }
@thing/db:db:generate:  ELIFECYCLE  Command failed with exit code 1.
@thing/db:db:generate: ERROR: command finished with error: command (/Users/me/WorkDir/RepoName/packages/db) pnpm run db:generate exited (1)
@thing/db:db:generate: [Error: ENOENT: no such file or directory, open '/Users/me/WorkDir/RepoName/thing/db/types.ts'] {
@thing/db:db:generate: errno: -2,
@thing/db:db:generate: code: 'ENOENT',
@thing/db:db:generate: syscall: 'open',
@thing/db:db:generate: path: '/Users/me/WorkDir/RepoName/packages/db/types.ts'
@thing/db:db:generate: }
@thing/db:db:generate:  ELIFECYCLE  Command failed with exit code 1.
@thing/db:db:generate: ERROR: command finished with error: command (/Users/me/WorkDir/RepoName/packages/db) pnpm run db:generate exited (1)
inputs in Turbo.json
"pipeline": {
"db:generate": {
"inputs": [
"prisma/schema.prisma"
],
"cache": false
},
"pipeline": {
"db:generate": {
"inputs": [
"prisma/schema.prisma"
],
"cache": false
},
tsconfig:
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true
},
"include": [".eslintrc.js", ".prettierrc.js"]
}
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true
},
"include": [".eslintrc.js", ".prettierrc.js"]
}
generator set up in schema.prisma
generator kysely {
provider = "prisma-kysely"
output = ".."
enumFileName = "enums.ts"
}
generator kysely {
provider = "prisma-kysely"
output = ".."
enumFileName = "enums.ts"
}
package.json db:generate command set up:
"db:generate": "pnpm with-env prisma generate && tsx prisma/postgenerate.ts",
"db:generate": "pnpm with-env prisma generate && tsx prisma/postgenerate.ts",
practically similar set up with https://acme-corp.jumr.dev/, I throw my schema in there and it successfully generated, but in my set up after I switched to using prisma-client-js and switch it back to prisma-kysely it didn't work. Even after using pnpm clean, deleted node-modules, and pnpm i again...is there some weird cache exists I don't know even if I specify cache:false Did some search around didn't find anyone has similar issue, anyone know what could be the cause? prisma is hoisted here in a turborepo.
Acme Corp
Next.js starter kit that includes everything you need to build a modern web application. Mobile application preconfigured, ready to go.
L
Lois286d ago
fixed. Delete the whole repo and clone it again. thanks to @tonya_ mod team the best