The "@fastify/static" package is missing. Please, make sure to install it to take advantage of FastifyAdapter.useStaticAssets().
since you're using @nestjs/swagger@6 + @nestjs/platform-fastify@9, you need to install @fastify/static as well because it will be used by @nestjs/swagger, this is how peer dependencies works.
You could improve the docs on that: docs.nestjs.com/migration-guide#nestjsswagger-package
既然你使用的是@nestjs/swagger@6+@nestjs/platform-fastify@9,您还需要安装@fastify/static,因为它将由@nestjs/sagger使用,这就是对等依赖的工作原理。
你可以改进这方面的文档:docs.nestjs.com/migration-guide#nestjsswagger包
Nestjs not starting with fastify and swagger: "The "@fastify/static" package is missing"
Updated Jul 26, 2022
Loading...