I am following the walkthrough from the microsoft docs for using typescript in a vs code project. When I try and run the build task, the terminal comes up with
Executing task: c:\whatever\my path with spaces\Projects\ProjectName\node_modules.bin\tsc.cmd -p "c:\whatever\my path with spaces\Projects\ProjectName\tsconfig.json"
and the error
'c:\whatever\my' is not recognized as an internal or external command,
That is, the space in the folder name is confusing the task runner. I need something like
call "c:\whatever\my path with spaces\Projects\ProjectName\node_modules\.bin\tsc.cmd" -p "c:\whatever\my path with spaces\Projects\ProjectName\tsconfig.json"
How do I set up VS Code so the terminal recieves an input it can interpret with spaces in the directory name? Thank you
current tasks.json:
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"problemMatcher": [
"$tsc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
You should use quotation marks \"
(slash + quotation mark) for the entire command as in
"command": "\"c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe\"",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With