由于某种原因npx tsc --init打印出以下错误:
$ npx tsc --init
npx: installed 1 in 1.467s
error TS5023: Unknown compiler option 'init'.
Run Code Online (Sandbox Code Playgroud)
我已经typescript用Yarn 2安装了这个包:
$ yarn add -D typescript
? YN0000: ? Resolution step
? YN0000: ? Completed in 0.31s
? YN0000: ? Fetch step
? YN0013: ? typescript@npm:3.9.3 can't be found in the cache and will be fetched from the remote registry
? YN0013: ? typescript@patch:typescript@npm%3A3.9.3#builtin<compat/typescript>::version=3.9.3&hash=8cac75 can't be found in the cache and will be fetched from …Run Code Online (Sandbox Code Playgroud)