如果使用了代理网络,因为npm无法自动识别Internet代理,则需要手动设置npm代理才能下载包。

设置命令:

   npm config set proxy http://proxyhost:proxyport

   npm config set http-proxy http://proxyhost:proxyport

   npm config set https-proxy http://proxyhost:proxyport

   npm config set registry http://registry.npmjs.org/

   npm cache clean --force



然后再安装Typescript:

   npm install -g typescript




相关文章:

  • 2021-04-20
  • 2021-12-22
  • 2021-06-24
  • 2022-02-16
  • 2021-09-11
  • 2021-10-15
  • 2021-04-12
猜你喜欢
  • 2022-12-23
  • 2022-02-19
  • 2021-12-25
  • 2022-12-23
  • 2021-10-06
  • 2021-06-22
  • 2021-07-28
相关资源
相似解决方案