'tsc command not found' in compiling typescript

后端 未结 15 933
耶瑟儿~
耶瑟儿~ 2020-12-05 02:02

I want to install typescript, so I used the following command:

npm install -g typescript 

and test tsc --version, but it just

15条回答
  •  自闭症患者
    2020-12-05 02:05

    1. Check your npm version

    2. If it's not properly installed, then install it first

    3. run this command npm install typescript -g

    4. now tsc .ts

    5. It'll create a corresponding .js file. eg .js

    6. now try node .js

提交回复
热议问题