Error: Unsupported Schema in Effect Library's Partial Transformation
[1:53:30] ➜ effect-app-monorepo git:(main) ✗ node packages/server/build/esm/server.js
file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.6/node_modules/effect/dist/esm/SchemaAST.js:2060
throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast));
^
Error: Unsupported schema
schema (Transformation): (Todo (Encoded side) <-> Todo)
at Module.partial (file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.6/node_modules/effect/dist/esm/SchemaAST.js:2060:15)
at Module.partial (file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.6/node_modules/effect/dist/esm/Schema.js:1488:41)
at ResponseSuccessArray (file:///Users/smhmayboudi/Developer/effect-app-monorepo/packages/domain/dist/dist/esm/shared/adapter/Response.js:14:29)
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/packages/domain/dist/dist/esm/todo/adapter/TodoAdapterDriving.js:16:143
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:647:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
Node.js v22.18.0[1:53:30] ➜ effect-app-monorepo git:(main) ✗ node packages/server/build/esm/server.js
file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.6/node_modules/effect/dist/esm/SchemaAST.js:2060
throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast));
^
Error: Unsupported schema
schema (Transformation): (Todo (Encoded side) <-> Todo)
at Module.partial (file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.6/node_modules/effect/dist/esm/SchemaAST.js:2060:15)
at Module.partial (file:///Users/smhmayboudi/Developer/effect-app-monorepo/node_modules/.pnpm/effect@3.17.6/node_modules/effect/dist/esm/Schema.js:1488:41)
at ResponseSuccessArray (file:///Users/smhmayboudi/Developer/effect-app-monorepo/packages/domain/dist/dist/esm/shared/adapter/Response.js:14:29)
at file:///Users/smhmayboudi/Developer/effect-app-monorepo/packages/domain/dist/dist/esm/todo/adapter/TodoAdapterDriving.js:16:143
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:647:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
Node.js v22.18.0I am getting this error and the source code is available at https://github.com/smhmayboudi/effect-app-monorepo/.
The problem comes from partial of this code:
export const ResponseSuccessArray = <T extends Schema.Schema<any>>(schema: T) =>
Schema.Struct({ data: Schema.Array(Schema.partial(schema)) })export const ResponseSuccessArray = <T extends Schema.Schema<any>>(schema: T) =>
Schema.Struct({ data: Schema.Array(Schema.partial(schema)) })