If I use tsc it doesn't work. If I don't have tsc but have typescript, it still doesn't work. What can I do?
You have to install the typescript library like this.
npm install typescript --save-dev
Then npx tsc command will work.
npx tsc
What you have installed is a deprecated library called tsc Check here. So you may have to remove that first with the following command
tsc
npm uninstall tsc