Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@nestjs/platform-fastify: fastify version mismatch Apollo v3 requirements #2307

Closed
3 of 15 tasks
karolh95 opened this issue Jul 18, 2022 · 2 comments
Closed
3 of 15 tasks

Comments

@karolh95
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Application throws FastifyError: fastify-plugin: fastify-accepts - expected '3.x' fastify version, '4.2.1' is installed

Minimum reproduction code

https://github.com/karolh95/nestjs-fastify

Steps to reproduce

  1. run yarn install
  2. run yarn start:dev

Expected behavior

Application should start without throwing any exceptions

Package

  • I don't know. Or some 3rd-party package
  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices
  • @nestjs/platform-express
  • @nestjs/platform-fastify
  • @nestjs/platform-socket.io
  • @nestjs/platform-ws
  • @nestjs/testing
  • @nestjs/websockets
  • Other (see below)

Other package

No response

NestJS version

9.0.1

Packages versions

[System Information]
OS Version : Linux 5.4
NodeJS Version : v14.18.1
YARN Version : 1.22.17

[Nest CLI]
Nest CLI Version : 9.0.0

[Nest Platform Information]
platform-express version : 9.0.4
platform-fastify version : 9.0.4
schematics version : 9.0.1
graphql version : 10.0.18
testing version : 9.0.4
apollo version : 10.0.17
common version : 9.0.4
core version : 9.0.4
cli version : 9.0.0

Node.js version

14.18.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

NestJS docs:

@nestjs/graphql@>=9 and @nestjs/apollo^10 packages are compatible with Apollo v3

Apollo docs:

Apollo Server 3 supports Fastify v3.

nestjs/[email protected] dependency:

   "@fastify/cors" "8.0.0"
    "@fastify/formbody" "7.0.1"
    "@fastify/middie" "8.0.0"
    fastify "4.2.1"
    light-my-request "5.1.0"
    path-to-regexp "3.2.0"
    tslib "2.4.0"

@fastify/cors and @fastify/formbody supports Fastify versions 3.x

@karolh95 karolh95 changed the title Fastify version mismatch Apollo v3 requirements @nestjs/platform-fastify: fastify version mismatch Apollo v3 requirements Jul 18, 2022
@kamilmysliwiec kamilmysliwiec transferred this issue from nestjs/nest Jul 18, 2022
@kamilmysliwiec
Copy link
Member

apollographql/apollo-server#6576

Fastify v4 cannot be used with apollo-server-fastify v3. If you're using Fastify + NestJS + Apollo, I'd suggest not upgrading to v9 just yet

@nestjs nestjs locked and limited conversation to collaborators Jul 20, 2022
@kamilmysliwiec
Copy link
Member

#2636 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants