question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fastify fastify-static deprication still showing even after updated to @fastify/static@5.0.0.

See original GitHub issue

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

3.20.2

Plugin version

5.0.0

Node.js version

16.4

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

Ubuntu 18.04.6 LTS

Description

👋Hello everyone

I still receiving a warning even after I updated to latest version - [FST_MODULE_DEP_FASTIFY-STATIC] FastifyWarning.fastify-static: fastify-static has been deprecated. Use @fastify/static@5.0.0 instead.

I have updated to the latest version “@fastify/static”: “^5.0.0”.

I still am receiving the same error.

I have the same error with “@fastify/multipart” & “@fastify/cors”. fixed with just small updated and errors are gone.

but “@fastify/static” still giving me errors.

my package.json:

  "dependencies": {
    "@fastify/static": "^5.0.0",
    ...
    "fastify": "^3.20.2",
    ...
  },

Steps to Reproduce

the basic command to run

npm install
npm run dev

Reproduced Small Repo

Expected Behavior

I expect to no longer see the error warning after updates to “@fastify/static”: “^5.0.0”

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Eommcommented, Jul 30, 2022

thanks, do they have to be in a same version?

Yes, v5 works, but it is a fluke. they are independent

0reactions
eevan7a9commented, Jul 30, 2022

I tried npm install @fastify/swagger@5. but No matching version found for @fastify/swagger@5.

so I tried npm install @fastify/swagger@6, now it’s working and no more warnings 🎉

Thanks again

Read more comments on GitHub >

github_iconTop Results From Across the Web

fastify/fastify-static: Plugin for serving static file as fast ... - GitHub
The absolute path of the directory that contains the files to serve. The file to serve will be determined by combining req.url with...
Read more >
Updating your Node apps for Fastify 4 - Glitch Help Center
1. Update to Node 14 · 2. Update Fastify · 3. Replace deprecated packages · 4. Update your Fastify server syntax · 5....
Read more >
Fastify, Fast and low overhead web framework, for Node.js
Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture, inspired...
Read more >
ch-4: update content related to deprecated fastify-static
https://www.npmjs.com/package/fastify-static - this seems to be deprecated and therefore corresponding updates have to be done, like:
Read more >
Fastify with Heroku - Stack Overflow
Sometimes, the site even doesn't load! Any help is greatly appreciated ! Thanks ! heroku · fastify · Share.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found