0

I'm trying to use the following tutorial to learn ReactJS: http://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm

I'm on a corporate network, so I'm under a proxy, hence I cannot install anything using npm install.. I need to do the following: npm install -g babel; npm install -g babel-cli; npm install webpack --save; npm install webpack-dev-server --save; npm install react --save etc.. So, how do I do that under a proxy?

Ramya
  • 31
  • 2
  • 8

1 Answers1

0

These are plenty of examples to use npm with proxy. You may want to take a look of these:

Generally, you can just run those commands to use an HTTP proxy:

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

Else, if you are using Mac and want to use SocksV5 proxy, this is your command (Source: https://github.com/npm/npm/issues/6204):

ALL_PROXY=socks5://127.0.0.1:5000 npm install anypackage -g
Community
  • 1
  • 1
Philip Tzou
  • 5,926
  • 2
  • 18
  • 27