Reputation: 5224
I inherited a React
project and after getting the latest code it failed to run - the previous developer isn't available. So, with no experience, I got on with it
Here's a list of the thing I did:
Node
to latestNPM
to latestVS Code
to latestpackage-lock.json
npm<whatever>
commands that are littered all over internetnode_modules
So, now I can't even get npm install --verbose
to work. It just hangs and gives no feedback. I can't reinstall Node
because the jokers here got us locked-down.
What can I do to install the packages? Am I doomed?
UPDATE: I disconnected from the network and went on the company wifi and npm install
worked. How can that be?
Upvotes: 0
Views: 109
Reputation: 6682
Due to your update - probably your machine is behind the company proxy, that's why npm cannot get packages. To fix this find your proxy address, and after this run in terminal:
npm config set proxy http://yourproxy.company.com:8080
npm config set https-proxy http://yourproxy.company.com:8080
I found this method on https://jjasonclark.com/how-to-setup-node-behind-web-proxy/, works very good.
Upvotes: 1