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

Mercurius 8 throws error about using fastify-static after upgrading to use @fastify/static #791

Closed
jessekrubin opened this issue May 5, 2022 · 4 comments

Comments

@jessekrubin
Copy link

I get the following warning:

(node:11324) [FST_MODULE_DEP_FASTIFY-STATIC] FastifyWarning.fastify-static: fastify-static has been deprecated. Use @fastify/static@5.0.0 instead.
(Use `node --trace-warnings ...` to show where the warning was created)

I can send a PR for this fix if I have time soon.

@mcollina
Copy link
Collaborator

mcollina commented May 5, 2022

Go for it!

@jessekrubin
Copy link
Author

@mcollina for a backport like this do I PR directly to the v8.x branch?

@jessekrubin
Copy link
Author

Made the PR to the v8x branch

#792

@mmahkamov
Copy link

@jessekrubin @mcollina

Using Mercurius 8.13.0 I'm seeing the following error message:

FastifyError [FST_ERR_PLUGIN_VERSION_MISMATCH]: fastify-plugin: fastify-static - expected '3.x' fastify version, '4.3.0' is installed

I've verified that 8.13.0 is referencing @fastify/static in its package.json.

Verified that in node_modules @fastify/static 5.0.2 got installed. However, I see this in index.js of @fastify/static:

module.exports = fp(fastifyStatic, {
  fastify: '3.x',
  name: 'fastify-static'
})

Apparently, @fastify/static supports fastify 4.x starting from 6.0.0

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

No branches or pull requests

3 participants