typescript-node-walkthrough
typescript-node-walkthrough copied to clipboard
Cannot connect to runtime process, ECONNREFUSED
I know this was done over a year ago from now, but the debug settings gives the Cannot connect to runtime process, ECONNREFUSED error on my machine.
After very long time googling around here's the settings that worked on my machine which you might need to update. 🙂
package.json
"scripts": {
"start": "node --inspect -r ts-node/register src/server.ts",
"dev": "./node_modules/nodemon/bin/nodemon.js",
"test": "jest",
"test:watch": "jest --watch"
}
nodemon.json
{
"ignore": ["**/*.test.ts", "**/*.spec.ts", ".git", "node_modules"],
"watch": ["src"],
"exec": "npm start",
"ext": "ts, gql",
"inspect": true,
"events": {
"restart": "echo \"[Warning] Remember run npm run test b4 push to dev branch !\""
}
}
launch.json
{
"version": "0.2.0",
"configurations": [{
"type": "node",
"request": "attach",
"name": "Attach to Process",
"port": 9229,
"restart": true,
"protocol": "inspector",
// "processId": "${command:PickProcess}",
"address": "localhost"
}]
}