fastify.next is not a function
See original GitHub issueYou have already researched for similar issues?
Yes. I searched in the issue list and could n’t find any.
Are you sure this is an issue with the fastify or are you just looking for some help?
The issue seem to be in fastify-nextjs plugin.
Steps to reproduce.
- clone https://github.com/fastify/fastify-nextjs.git
cd fastify-nextjs && npm install
- run
npm run dev
node version: v12.16.1 npm : 6.13.4
Error:
If you have issues with the fastify.io site, please open an issue here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
TypeError: fastify.next is not a function · Issue #384 - GitHub
I found that the plugin was not executed after preparation. app.prepare().then(()=>{ // Not performed }). Steps to Reproduce. package.json.
Read more >TypeError : next() is not a function - node.js - Stack Overflow
I have two functions with the exact code but they check for different schemas. My first function runs without any exception. However, when...
Read more >Server - Fastify
serverFactory is a function that takes a handler parameter, which takes the request and response objects as parameters, and an options object, which...
Read more >@fastify/nextjs - npm
js framework. This library is for letting an existing Fastify server utilize NextJS, not for replacing NextJS' internal webserver with Fastify.
Read more >Building a Full-stack App with Next.js - Arctype
By default, Next.js does not use Fastify as its server. To use Fastify to serve our Next.js app, edit the scripts field in...
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
This issue seem to be a timeout issue and by default fastify wait for 10 secs. Changed timeout period and it started working.
For what it’s worth I’m not seeing this as related to a timeout. I get this behavior immediately when setting
NODE_ENV=production
. Has anyone come across this / figured out a way to solve it?