0

For performance reasons of a relatively complex Nestjs application, we have chosen to use Fastify as our HTTP provider.

We are at a stage where we need to version out api and are running into problems after following instructions on the standard Nestjs guide:

  const app = await NestFactory.create<NestFastifyApplication>(
    AppModule,
    new FastifyAdapter(fastifyInstance),
    {},
  );

  app.enableVersioning();

The error received is:

Property 'enableVersioning' does not exist on type 'NestFastifyApplication'.ts(2339)

I haven't been able to find a solution anywhere and thought I'd ask and see if anyone else has had the same problem and found a solution.

Mr Citizen
  • 37
  • 1
  • 5

1 Answers1

0

looks like you need to upgrade @nestjs/common because enableVersioning does exists in NestFastifyApplication:

Micael Levi
  • 5,054
  • 2
  • 16
  • 27