How to fix “unable to start program js-debug the debugger is not properly installed”

I am unable to find a solution to this issue anywhere.
Whenever I run my project (React + ASP.NET Core), it opens a command line window that runs the front-end using vite. But along with it comes this popup that gives the error “unable to start program js-debug the debugger is not properly installed”.

I have tried disabling and enabling “Enable JS debugging in Chrome, Edge, etc.” in the debugger tab.