# TypeScript Debugger - The preLaunchTask 'tsc: build - tsconfig.json' terminated with exit code 127

**URL:** <https://forum.codewithmosh.com/t/typescript-debugger-the-prelaunchtask-tsc-build-tsconfig-json-terminated-with-exit-code-127/19501>\
**Category:** TypeScript\
**Created:** [April 11, 2023, 1:59am UTC](https://forum.codewithmosh.com/t/typescript-debugger-the-prelaunchtask-tsc-build-tsconfig-json-terminated-with-exit-code-127/19501 "2023-04-11T01:59:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharktank](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sharktank/32/4396_2.png) [@sharktank](https://forum.codewithmosh.com/u/sharktank)\
**Post date:** [April 11, 2023, 1:59am UTC](https://forum.codewithmosh.com/t/typescript-debugger-the-prelaunchtask-tsc-build-tsconfig-json-terminated-with-exit-code-127/19501/1 "2023-04-11T01:59:43Z")

</div>

I’m following along with mosh’s tutorial on typescript but I’m stuck at the part where we are trying to setup up the debugger. Everytime time I try to run I get this message " **The preLaunchTask ‘tsc: build - tsconfig.json’ terminated with exit code 127.**". In the terminal I also get this message too

> Executing task: tsc -p ‘/Users/alecsmith/Documents/TypeScript Work/tsconfig.json’
> 
> zsh:1: command not found: tsc
> 
> - The terminal process “/bin/zsh ‘-c’, ‘tsc -p ‘/Users/alecsmith/Documents/TypeScript Work/tsconfig.json’’” failed to launch (exit code: 127).
> - Terminal will be reused by tasks, press any key to close it.

I have Oh My ZSH installed and I’m using a mac with Vscode. I don’t really know where to begin with dealing with why this is happening on my end. I’ve checked multiple times to make use tsc is installed globally and it is.

---

<div class="post-metadata">

**Author:** ![codeWalrus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/codewalrus/32/7583_2.png) [@codeWalrus](https://forum.codewithmosh.com/u/codeWalrus)\
**Post date:** [January 9, 2024, 2:31pm UTC](https://forum.codewithmosh.com/t/typescript-debugger-the-prelaunchtask-tsc-build-tsconfig-json-terminated-with-exit-code-127/19501/2 "2024-01-09T14:31:49Z")

</div>

Hey  
I don’t know if you’ve installed typescript via npm for your project, but I found that installing it specifically for my project in VSCode worked for me. Execute this in the terminal of VSCode:  
`npm i typescript --save-dev`

I have Typescript working on my macos terminal, but the filepaths/ directories work a bit differently for me when I use VSCode.  
Anyways hope this helps.

Some more help and info if this doesn’t work:

> **[tsc command not found TypeScript error \[Solved\] | bobbyhadz](https://bobbyhadz.com/blog/typescript-tsc-command-not-found)**
>
> To solve the error 'tsc: command not found', install the typescript package globally by running \`npm install typescript@latest -g\`.
