我正在使用带有 prisma 的打字稿,当我尝试运行时prisma generate,它不断抛出
TypeError: collection is not iterable.
at keyBy (/node_modules/@prisma/client/generator-build/index.js:57685:21)
at Object.getTypeMap (/node_modules/@prisma/client/generator-build/index.js:59468:17)
at new DMMFHelper (/node_modules/@prisma/client/generator-build/index.js:59365:25)
at new TSClient (/node_modules/@prisma/client/generator-build/index.js:60630:17)
at buildClient (/node_modules/@prisma/client/generator-build/index.js:60876:18)
at generateClient (/node_modules/@prisma/client/generator-build/index.js:60947:47)
at async LineStream.<anonymous> (/node_modules/@prisma/client/generator-build/index.js:54186:24)
Run Code Online (Sandbox Code Playgroud)
我认为设置有问题,但找不到具体原因。
我的 prisma 版本是 3.9.2,@prisma/client 是 3.10.0,使用 mac os
tsconfig.json
{
"compilerOptions": {
/* Language and Environment */
"target": "es2018",
/* Modules */
"module": "commonjs",
"moduleResolution": "node",
/* Emit */
"outDir": "./build",
"rootDir": "./src",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
/* Type Checking */
"strict": true,
"skipLibCheck": …Run Code Online (Sandbox Code Playgroud)