ylliX - Online Advertising Network

NestJS Swagger – How to resolve TypeError: Cannot read properties of null (reading ‘name’)

I’m encountering the following error while setting up Swagger in my NestJS project: /app/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:189 let schemaObjectName = trueMetadataType.name; ^ TypeError: Cannot read properties of null (reading ‘name’) at SchemaObjectFactory.createNotBuiltInTypeReference (/app/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:189:49) at SchemaObjectFactory.createSchemaMetadata (/app/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:297:25) at SchemaObjectFactory.mergePropertyWithMetadata (/app/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:137:21) … This error occurs when generating the Swagger document in my main.ts file: async function bootstrap() { const app […]