You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`The ${fileName==='proxy' ? 'Proxy' : 'Middleware'} "${page}" must export a \`${fileName}\` or a \`default\` function`
369
+
`The file ${fileName} must export a function, either as a default export or as a named ${fileName} export.\n`+
370
+
`This function is what Next.js runs for every request handled by this ${fileName==='proxy' ? 'proxy (previously called middleware)' : 'middleware'}.\n\n`+
371
+
`Why this happens:\n`+
372
+
`- The file exists but doesn't export a function.\n`+
373
+
`- The export is not a function (e.g., an object or constant).\n`+
374
+
`- There's a syntax error preventing the export from being recognized.\n\n`+
375
+
`To fix it:\n`+
376
+
`- Check your "${fileName}" file.\n`+
377
+
`- Ensure it has either a default or "${fileName}" function export.\n`+
0 commit comments