fastify / fastify-accepts-serializer

Serializer according to the accept header

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[2.0.1] Error: fastify-plugin: fastify-accepts - expected '3.x' fastify version, '2.15.1' is installed

mysticatea opened this issue Β· comments

πŸ› Bug Report

An existing application has been broken.

Error: fastify-plugin: fastify-accepts - expected '3.x' fastify version, '2.15.1' is installed

To Reproduce

Steps to reproduce the behavior:

The dependencies of that application are:

  • fastify ... ^2.12.1
  • fastify-accepts-serializer ... ^2.0.1
"use strict"
const fastify = require("fastify")
const fastifyAcceptsSerializer = require("fastify-accepts-serializer")
const app = fastify()
app.register(fastifyAcceptsSerializer)
app.listen(3000, "localhost", (err, address) => {})

Then run it. It stops with a critical error:

Error: fastify-plugin: fastify-accepts - expected '3.x' fastify version, '2.15.1' is installed

The root cause is there: https://github.com/fastify/fastify-accepts-serializer/blob/v2.0.1/package.json#L32

The fastify-accepts-serializer depends on an incompatible version of fastify-accepts.

Expected behavior

No errors.

Your Environment

  • node version: 14.4.0
  • fastify version: ^2.12.1
  • os: Windows, Linux

Thank you for merged and released!