TypeScript安装备忘:npm proxy设置

如果使用了代理网络,因为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




原文地址:https://www.cnblogs.com/lixiaobin/p/npmproxy.html