I have been developping a Next app for quite a while now.
After the build, my app works just fine locally, but throws this on the server:
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at NextNodeServer.getEdgeFunctions (...node_modules/next/dist/server/next-server.js:656:23)
at NextNodeServer.generateCatchAllMiddlewareRoute (...node_modules/next/dist/server/next-server.js:991:22)
at NextNodeServer.generateRoutes (...node_modules/next/dist/server/base-server.js:464:41)
at new Server (...node_modules/next/dist/server/base-server.js:109:48)
at new NextNodeServer (...node_modules/next/dist/server/next-server.js:62:9)
at NextServer.createServer (...node_modules/next/dist/server/next.js:128:16)
at async ...node_modules/next/dist/server/next.js:137:31
IMO this error message isn't really explicit... The previous version of the worked just fine I changed it so much I don't really know where to look.
Of course I ran npm install btw.
I know that this is probably too little info to have a definite answer, but I have no idea of where I can look...