-
Notifications
You must be signed in to change notification settings - Fork 61
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
Does not work with fastify-cli typescript template #667
Comments
cc @fastify/typescript |
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
I have no idea how to fix this bug and after more research it looks like that behavior comes from the nextjs implementation... Should I open a ticket on their side, find a way to block the behavior on fastify nextjs or make the tsconfig setting works globally with thoses settings for fastify ? |
I believe it is a non-issue here. Next.js planned to modify the user setting, but it already provided the information that modified. It doesn't means that the current |
I not pretty sure I get what you mean, it's not a modifications that I ask it just don't work the way I showed in the description ^^' |
Then, a proper repro with all the code would be great. |
I'm running into the same problem. I created a typescript project with A more robust demo repo of how to setup this up with the default typescript fastify project would be really helpful. |
Also, one maybe helpful clarification. I modified by build step to be :
With this change |
I put together a demo repository that demonstrates this problem: https://github.com/fozziethebeat/fastify-nextjs-ts. I created this by running npx fastify generate fastify-nextjs-ts --lang=ts
cd fastify-next-ts
npm install
npm i @fastify/nextjs next react react-dom And then adding a basic I can confirm that |
To try and diagnose this further, I did the same steps but with the standard javascript Fastify template project. I stored that in this repo: https://github.com/fozziethebeat/fastify-nextjs-js With the javascript template, |
I assume |
I think that's the part I wasn't too familiar with (Still getting familiar with fastify). Replacing the typescript
did the trick. now |
I am going to close and pin this issue. |
I updated my test typescript repo with the changes and things are now working smoothly for me. I'll freeze this demo repo so others that run into this problem can replicate the changes. |
Prerequisites
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:
After that the code emit this message
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.
The text was updated successfully, but these errors were encountered: