When using npx tsc --init
without typescript installed, NPM seems to go through the motions to download tsc
, and has some commands, but not all (it doesn't have --init
), and I realize its because its using a really old version of tsc
. Thats annoying, it should use the latest one :)
To reproduce this yourself, make sure you don't have typescript installed globally and also are not in a NPM project (with package.json). Then type npx tsc --version
: you will get
npx: installed 1 in 0.868s
message TS6029: Version 1.5.3
Obviously the workaround is to install typescript first, but then there is no point of npx
, is there? Only then do I get the latest version:
Version 4.1.3