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...
目录
文章列表
王小扬博客
云原生
Git
Elasticsearch
Apollo
产品
Think
生活技巧
软件开发
计算机网络
CI
DB
设计
缓存
Docker
Node
操作系统
Java
大前端
Nestjs
其他
PHP
AI