Fastify generate use deprecated libraries
See original GitHub issuePrerequisites
- 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:
- Created a year ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 😁.
Fixed in https://github.com/fastify/fastify-cli/releases/tag/v3.0.0.