-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
bugConfirmed bugConfirmed bug
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.0.0
Plugin version
9.2.0
Node.js version
14.20.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.6.1
Description
The plugin don't work on the basic fastify-cli template in typescript.
Adding this:
import FastifyNextJS from '@fastify/nextjs';
...
void fastify.register(FastifyNextJS, {
dev: process.env.NODE_ENV !== 'production',
prefix: '/admin',
});
After that the code emit this message
We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default.
[App]
[App] The following suggested values were added to your tsconfig.json. These values can be changed to fit your project's needs:
[App]
[App] - allowJs was set to true
[App] - noEmit was set to true
[App] - incremental was set to true
[App] - exclude was set to ['node_modules']
[App]
[App] The following mandatory changes were made to your tsconfig.json:
[App]
[App] - esModuleInterop was set to true (requirement for SWC / babel)
[App] - isolatedModules was set to true (requirement for SWC / Babel)
[App] - jsx was set to preserve (next.js implements its own optimized jsx transform)
Then change the tsconfig.json. And this make the app loop restart.
From what I've read it looks to be similar to this thread already closed #407.
Steps to Reproduce
Install fastify with ts template:
fastify generate . --lang=ts
Then install the fastify-nextjs plugin the conventional way.
Expected Behavior
The app should be able to work with the FastifyNextJS in typescript version.
fozziethebeat
Metadata
Metadata
Assignees
Labels
bugConfirmed bugConfirmed bug