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 generate use deprecated libraries

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.0.0

Plugin version

2.15.0

Node.js version

16.14.2

Operating system

Linux

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

manjaro-release 21.2.6-1

Description

The fastify generate command generate a project with two libraries : fastify-sensible and fastify-autoload which are deprecated since respectively 3.2.0 and 3.13.0. For classic JS projects it’s not blocking but for TS projects it generates an error during transpiling into pure JS due to “implicit any types” :

src/plugins/sensible.ts:2:43 - error TS7016: Could not find a declaration file for module 'fastify-sensible'. 'node_modules/fastify- 
sensible/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/fastify-sensible` if it exists or add a new declaration  
(.d.ts) file containing `declare module 'fastify-sensible';`
src/app.ts:2:47 - error TS7016: Could not find a declaration file for module 'fastify-autoload'. 'node_modules/fastify- 
autoload/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/fastify-autoload` if it exists or add a new declaration  
(.d.ts) file containing `declare module 'fastify-autoload';`

Steps to Reproduce

  • Start a new fresh project with fastify generate --lang=ts test
  • Run npm install
  • Run npm run build:ts

Expected Behavior

The project should have up to date dependencies so tsc can transpile our code without changing the two libraries by hand.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Roxxas96commented, May 6, 2022

Hey ! This is the first Issue of my life on an external project. I apologize for any mistakes I could have done ! I would apreciate all your comments/advice 😁.

0reactions
mcollinacommented, May 12, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Server - Fastify
The Fastify module exports a factory function that is used to create new Fastify server instances. This factory function accepts an options object...
Read more >
FASTIFY - Vardiac listen method is deprecated. FIX - YouTube
Link to FASTIFY PLAYLIST:https://www.youtube.com/watch?v=F89XrG6dmUY&list=PLZdwvOOinjFY5SphkFYlH2Su1trI0fwANFollow me on ...
Read more >
Using PostGraphile as a Library
PostGraphileResponseKoa - for Koa; PostGraphileResponseFastify3 - for Fastify v3. You can also make your own by sub-classing PostGraphileResponse , for help ...
Read more >
GraphQL Code Libraries, Tools and Services
Tiny GraphQL client library using template strings. ... GraphQL code generator with flexible support for custom plugins and templates like Typescript ...
Read more >
fastify-static - npm
fastify -static@4.7.0` has been deprecated. Please use `@fastify/static@5.0.0` instead.. Latest version: 4.7.0, last published: 8 months ago.
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