We're setting up a new OSx machine and getting this message when trying to launch and debug a TypeScript based node app:
Cannot launch program '/Projects/is/0.0.34/server/server/server.ts'; setting the 'outDir or outFiles' attribute might help.
We've been using the same launch config for over a year and we're not writing the output to a separate directory, so there should no need to set 'outFiles'. The program runs fine from the command prompt. However, trying to launch the app in VsCode is now returning the error above. We did recently upgraded to Node v8.5.0 from v7.3.0. Based on the docs this should still work. The other posts regarding this issue relate to issues resulting from writing the source (and sourcemaps) to a different directory.
launch.json
{
"configurations": [
{
"name": "Launch Program",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/server/server.ts",
"cwd": "${workspaceRoot}"
}
]
}
Here's the tsconfig:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"watch": true,
"allowUnreachableCode": true,
"noImplicitUseStrict": true
}
}