安装ts之前需要安装好node,

安装ts:

  1. npm install -g typescript
  

  /opt/node/bin/tsc -> /opt/node/lib/node_modules/typescript/bin/tsc
  /opt/node/bin/tsserver -> /opt/node/lib/node_modules/typescript/bin/tsserver
  + typescript@3.2.1
  added 1 package from 1 contributor in 7.837s

 

  2. 建立链接,为了在电脑任何一个地方都可以使用

  ln -s /opt/node/bin/tsc /usr/local/bin/tsc

  3. 查看版本

  tsc --version
  Version 3.2.1

 

相关文章:

  • 2021-09-09
  • 2021-11-15
  • 2022-12-23
  • 2021-11-21
  • 2022-02-19
  • 2021-11-18
  • 2021-06-16
猜你喜欢
  • 2021-12-13
  • 2022-02-16
  • 2021-09-28
  • 2021-05-20
  • 2022-12-23
相关资源
相似解决方案