#nest g resource failing
1 messages · Page 1 of 1 (latest)
This is stupid error I'm getting
Running seed command `ts-node prisma/seed.ts` ...
/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
prisma/seed.ts:36:11 - error TS2322: Type '{ userId: any; name: any; image: any; profileImage: any; }' is not assignable to type '(Without<ProductCreateInput, ProductUncheckedCreateInput> & ProductUncheckedCreateInput) | (Without<...> & ProductCreateInput)'.
Type '{ userId: any; name: any; image: any; profileImage: any; }' is not assignable to type 'Without<ProductUncheckedCreateInput, ProductCreateInput> & ProductCreateInput'.
Type '{ userId: any; name: any; image: any; profileImage: any; }' is not assignable to type 'Without<ProductUncheckedCreateInput, ProductCreateInput>'.
Types of property 'userId' are incompatible.
Type 'any' is not assignable to type 'never'.
36 data: {
~~~~```
node_modules/.pnpm/@[email protected][email protected]/node_modules/.prisma/client/index.d.ts:4849:5
4849 data: XOR<ProductCreateInput, ProductUncheckedCreateInput>
~~~~
The expected type comes from property 'data' which is declared here on type '{ select?: ProductSelect; include?: ProductInclude; data: (Without<ProductCreateInput, ProductUncheckedCreateInput> & ProductUncheckedCreateInput) | (Without<...> & ProductCreateInput); }'
at createTSError (/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Object.require.extensions.<computed> [as .ts] (/Users/me/my_app/apps/api/node_modules/.pnpm/[email protected]_65w256gcgmxfcz3fxhbqinpra4/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
diagnosticCodes: [ 2322 ]
}
An error occurred while running the seed command:
Error: Command failed with exit code 1: ts-node prisma/seed.ts```
JS ecosystem is shut a POS