I try to put a path in tasks.json for typescript type task:
{
"version": "2.0.0",
"tasks": [
{
"identifier": "tsc-client",
"label": "tsc-client",
"type": "typescript",
"tsconfig": "src/client/tsconfig.json",
"problemMatcher": [
"$tsc"
]
},
{
"identifier": "tsc-server",
"label": "tsc-server",
"type": "typescript",
"tsconfig": "src/server/tsconfig.json",
"problemMatcher": [
"$tsc"
]
},
{
"identifier": "build-all",
"label": "build-all",
"dependsOn": ["tsc-client", "tsc-server"]
}
]
}
then in my launch.json I have:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"preLaunchTask": "tsc-client",
"name": "Launch Program",
"program": "${workspaceFolder}/server/server-repsic.js"
}
]
}
I lounch it and I obtain:
Error: The typescript task detection didn't contribute a task for the following configuration:
{
"identifier": "tsc-server",
"label": "tsc-server",
"type": "typescript",
"tsconfig": "src/server/tsconfig.json",
"problemMatcher": [
"$tsc"
]
}
The task will be ignored.
I check that in the root path I have the src/server/tsconfig.json
and src/client/tsconfig.json
. Also I type it in the console:
tsc -p src/client/tsconfig.json
and the command works fine.
$workSpaceRoot
– Silt