Nestjs版本控制配置时使用快速
出于相对复杂的Nestjs应用程序的性能原因,我们选择使用 fastify 作为我们的http Provider 。
我们处于需要版本的API阶段,并且在按照标准Nestjs 指南:
const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter(fastifyInstance),
{},
);
app.enableVersioning();
收到的错误是:
Property 'enableVersioning' does not exist on type 'NestFastifyApplication'.ts(2339)
我无法在任何地方找到解决方案,并想我会问并看看其他人是否遇到了相同的问题并找到了解决方案。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您需要升级
@nestjs/common
,因为enableVersioning
确实存在于nestfastifyapplication
:looks like you need to upgrade
@nestjs/common
becauseenableVersioning
does exists inNestFastifyApplication
: