如何在代理

时间:2016-07-12 19:38:59

标签: node.js reactjs npm babel

我尝试使用以下教程来学习ReactJS:http://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm

我在公司网络上,所以我在代理下,因此我无法使用npm install安装任何东西..我需要执行以下操作:npm install -g babel; npm install -g babel-cli; npm install webpack --save; npm install webpack-dev-server --save; npm install react --save等。所以,我如何在代理下做到这一点?

1 个答案:

答案 0 :(得分:0)

这些是使用npm和proxy的大量示例。你可能想看看这些:

通常,您可以运行这些命令以使用HTTP代理:

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

否则,如果您使用的是Mac并希望使用SocksV5代理,那么这就是您的命令(来源:https://github.com/npm/npm/issues/6204):

ALL_PROXY=socks5://127.0.0.1:5000 npm install anypackage -g
相关问题