1

I am trying to compile typescript code to JavaScript by following the documentation.

I created the watch task to compile the .ts files on pressing Ctrl+Shift+B. However, I get the error after I run the task:

'C:\Program' is not recognized as an internal or external command

I understand the cause of the error, as the directory Program Files has spaces in it, and I need quotes around it.

How do I update the build command to run the compiler with proper path?

enter image description here

1 Answer 1

2

I had to update the VS Code's integrated shell settings.

  1. Go to File > Preferences > Settings
  2. Search for shell
  3. Select the correct shell settings for your operating system.
  4. Either comment out the "terminal.integrated.shellArgs.windows" property, or update it to escape the double quotes around the directory. In my case it was Program Files directory which was causing trouble.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.