title: Nestjs Swagger UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `prototype` of 'undefined' or 'null'
body: <p>I am working on a Nestjs REST API project where I have to add swagger. I used this repo as an example: <a href="https://github.com/nestjs/nest/tree/master/sample/11-swagger" rel="nofollow noreferrer">https://github.com/nestjs/nest/tree/master/sample/11-swagger</a>  </p>
  
  <p>but I am getting this error:
  <code>
  UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'prototype' of 'undefined' or 'null'
  </code>
  and this one:
  <code>
  UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block or by rejecting a promise which was not handled with .catch().
  </code>
  the project is here:<br>
  <a href="https://github.com/strdr4605/nestjs-rest-api/blob/swagger/src/main.ts" rel="nofollow noreferrer">https://github.com/strdr4605/nestjs-rest-api/blob/swagger/src/main.ts</a></p>