I have set proxy for my npm, and now when I removed it
npm config rm http-proxy
I can't install packages.
npm try to use the proxy
Check your .npmrc file to see what's in there?
Related
I tried to run codes in my hyper-terminal (deleted nodemon and then reinstalled it) but at the end I still can NOT get the version of my nodemon, it says:
"C:\Users\azadk\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found"
Here’s what I tried to do:
I also tried to set the path of Environment variables to "C:\Program Files\nodejs" but still I can’t get the version.
If you are connected to some sort of VPN or your corporate internet, try to connect to another network and run the call again.
I entered these commands and the problem was resolved:
npm config rm proxy
npm config rm https-proxy
npm config delete http-proxy
npm config delete https-proxy
set HTTP_PROXY=null
set HTTPS_PROXY=null
I want list of npm registries. I cannot install npm packages from https://registry.npmjs.org/, registry http://r.cnpmjs.org, http://registry.npmjs.eu, https://registry.npm.taobao.org/. They are all blocked. If you have any idea please make me aware of how can i install packages
Why its blocked?
maybe the right solution will be to use proxy like that (use your proxy its just an example)
npm config set proxy http://proxy.com:8000
or
npm config set https-proxy http://proxy.com:8000
I want to configure node so that I can download packages using npm install knowing that I am inside a company with a proxy.
I tried commands like :
npm config set https-proxy "http://company%5Cuser:password#server:port/"
but nothing changes.
Did I miss something?
Try to also set the http proxy:
npm config set proxy "http://company%5Cuser:password#server:port/"
Using CNTLM proxy had spared me those configs.
While running the npm install command, I'm getting:
ERR 418 I m a teapot
I set a proxy but I'm not sure whether it is correctly parsed. I doubt that the proxy might be the reason. Can someone help me on this? I also ran npm config get proxy.
Try something like this:
npm config set proxy 213.169.158.34:8080
npm config set https-proxy 213.169.158.34:443
npm config set registry http://registry.npmjs.org/
npm instal
I am looking to store npm modules in a cache/locally in case the npm server is down and I cannot access the modules.
I hear npm-cache or npm-offline work well, but I'm not sure if they actually solve the problem I face - which is accessing an npm module locally.
Any recommendations?
Install offline-npm with
sudo npm install -g offline-npm
offline-npm will run a local http server with the content of your cache. Launch the server with:
offline-npm -n -d
You can then install packages from your cache with:
npm --registry http://localhost:4873 install <packagename>
To inspect the content of your cache run:
npm cache ls
You can also add a package to your cache without installing it with:
npm cache add <package>
For more information, read the official documentation of offline-npm.