I’m trying to get rid of the HTTPS proxy settings I previously set up for NPM. I’ve looked around online, but most posts just talk about setting up proxies for corporate networks. Not much help there!
I tried running these commands to clear the proxy settings:
npm config set http-proxy
npm config set https-proxy
The first one worked fine, but the second one gave me this warning:
npm WARN invalid config proxy=""
npm WARN invalid config Must be a full url with 'http://'
Now I’m not sure if I’ve actually cleared the HTTPS proxy setting or not. Can I ignore this warning? Is there a better way to remove the HTTPS proxy configuration? Any help would be great!
I’ve been in a similar situation before, and it can be a bit tricky. From my experience, the warning you’re seeing is actually normal when trying to clear the https-proxy setting. The key is to use the ‘delete’ command instead of ‘set’.
Try running these commands:
npm config delete http-proxy
npm config delete https-proxy
This should completely remove both proxy settings. To verify, you can then use:
npm config list
It’ll show you all your current npm configurations. If the proxy settings are gone, you’ve successfully removed them.
If you’re still having issues after this, it might be worth checking your global .npmrc file. Sometimes proxy settings can linger there. But in most cases, the delete commands should do the trick.
I’ve dealt with this issue before, and the solution is simpler than you might think. Instead of using ‘set’ with an empty value, you should use the ‘delete’ command to remove the proxy configurations entirely. Here’s what you need to do:
npm config delete http-proxy
npm config delete https-proxy
This will completely remove both proxy settings from your npm configuration. To confirm the changes, run:
npm config list
This will display your current npm settings. If the proxy entries are gone, you’ve successfully removed them.
If you’re still encountering issues, check your global .npmrc file. Sometimes, proxy settings can persist there. The file is usually located in your home directory. Remove any proxy-related lines if you find them there.
Remember, always be cautious when modifying npm configurations, especially if you’re working in a corporate environment where these settings might be necessary for network access.
hey there! i’ve had this issue b4. try using ‘delete’ instead of ‘set’:
npm config delete https-proxy
this should remove the https proxy setting. you can check with ‘npm config list’ to make sure it’s gone.
if that doesn’t work, maybe check ur global .npmrc file for any leftover proxy stuff.