Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
How to debug NextJS during the build phase

My nextJS app have a path with 50k plus pages. Running with npm run dev it works fine, but during build it gives me an error TypeError: Cannot read property 'page' of undefined at exportPaths.filter.route That is weird, because I know how many paths I am trying to do (56,427) and they are fine. I would really like to see where I messed up, but I can't launch a debugger for build stage ending with 'Starting inspector' multiple messages. I have tried other ways, but with no success.

Here is my config, which is pretty obsolete, but seems straightforward:

{
            "type": "node",
            "request": "launch",
            "name": "Next: Node",
            "runtimeExecutable": "${workspaceFolder}/node_modules/next/dist/bin/next",
            "env": {
                "NODE_OPTIONS": "--inspect"
            },
            "args": ["build"],
            "port": 9229,
            "console": "integratedTerminal"
        }

P.S. Debugging npm run dev works fine P.P.S. trying to 'listen' to the debugger in VS Code and launching debugger from command line, like in here https://nextjs.org/docs/advanced-features/debugging gives me the same problems.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda