Closed joshuaavalon closed 1 year ago
4.17.0
9.2.0
20.1.0
Windows
10
Error is thrown when next is updated to 13.4.3
- error uncaughtException: TypeError: Cannot read properties of undefined (reading 'nextConfig') at C:\Users\user\project\git\test1\node_modules\@fastify\nextjs\index.js:31:37
// index.js import createFastify from "fastify"; import nextJs from "@fastify/nextjs"; const fastify = createFastify(); const nextPlugin = nextJs.default; await fastify.register(nextPlugin); fastify.after(() => { fastify.next("/hello"); }); fastify.listen({ port: 8001 }, (err) => { if (err) throw err; console.log("Server listening on http://localhost:3000"); });
{ "name": "test1", "version": "1.0.0", "description": "", "main": "index.js", "type": "module", "scripts": { "start": "node index.js" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "@fastify/nextjs": "^9.2.0", "fastify": "^4.17.0", "next": "^13.4.3" } }
No error should be thrown.
See to related to vercel/next.js#50315
Prerequisites
Fastify version
4.17.0
Plugin version
9.2.0
Node.js version
20.1.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
Error is thrown when next is updated to 13.4.3
Steps to Reproduce
Expected Behavior
No error should be thrown.