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

467
Vistas
VSCode launch.json to debug node project within subfolder

I have a node project as a subfolder within my main project. I am trying to create a launch config for VS Code so that it starts debugging index.ts file when I open the parent folder. Here's what my folder structure looks like: Folder structure

So my node project is in the subfolder called NodeBackend. I want to press F5 or THE GREEN BUTTON on VS Code and start debugging my typescript file.

When I do that from within the parent folder I get an error:

Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

However, I can debug it without issues when I load the "NodeBackend" project in VS code and press F5 or THE GREEN BUTTON.

My launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceFolder}\\NodeBackend",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}\\NodeBackend\\src\\index.ts",
            "outFiles": [
                "${workspaceFolder}/**/*.js"
            ]
        }
    ]
}

Here's my source code: https://github.com/Kayes-Islam/SimpleProject

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