vscode에서 디버깅을 할 때 이런 에러가 났다. node가 설치된 위치를 찾아서 launch.json에 runtimeExecutable를 지정해주면 해결된다.
프로젝트 터미널에서 which node
를 입력해서 나온 node 경로를 복사한다. launch.json에 runtimeExecutable key를 입력하고 경로를 붙여넣어준다.
{
"configurations": [
{
//...
"runtimeExecutable": "/Users/name/.nvm/versions/node/v12.22.8/bin/node"
}
]
}