- Use yarn to avoid accidentally running code from un-installed packages
sh-3.2$ npx tsc --init
This is not the tsc command you are looking for
To get access to the TypeScript compiler, tsc, from the command line either:
- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from un-installed packages
![image](https://private-user-images.githubusercontent.com/4822597/330561430-16e1c76d-dd2c-46c9-9813-e13dde417a63.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2NzI1MTUsIm5iZiI6MTcyMTY3MjIxNSwicGF0aCI6Ii80ODIyNTk3LzMzMDU2MTQzMC0xNmUxYzc2ZC1kZDJjLTQ2YzktOTgxMy1lMTNkZGU0MTdhNjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjJUMTgxNjU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmE1OWFkYWFmZDY5OWIyMTZiN2Q0NmU2NjNjOWIzYzcxZGZjYjM5OGU1NDljYjJmYmFiYzFkMjA4YWMyNDg1NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.vejflNkG56fDrW_lv9cYI9WHTlG8BoBZxQr2JrQIt6Y)