Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
Mocha not found by Visual Studio Debugger

I'm trying to debug a set of Test for my javascript application using VSCode Debbugger, here is my configuration:

{ "args": [ "-u", "tdd", "--timeout", "999999", "--colors", "${workspaceFolder}/test" ], "internalConsoleOptions": "openOnSessionStart", "name": "Mocha Tests", "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", "request": "launch", "skipFiles": [ "<node_internals>/**" ], "type": "node" }

Which is the default one provided by Visual Studio for mocha tests, unfortunately when I run the configuration I get:

Uncaught Error Error: Cannot find module 'PROJECT_PATH/node_modules/mocha/bin/_mocha' at Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Module._load (node:internal/modules/cjs/loader:778:27) at executeUserEntryPoint (node:internal/modules/run_main:77:12) at <anonymous> (node:internal/main/run_main_module:17:47)

I double checked and the folder indeed do exists and mocha is installed both globally and inside the project, as I type:

mocha --version

I correctly get : 10.0, Any hints?

System config:
macOS Big Sur
Intel i7
VsCode 1.68.0
Node v16.14.0
Mocha v10.0
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!