I don’t know what happened, since the Internet works for me. But I don’t copy git repositories and do not go to github
git bash
Rahat#Rahat-PC MINGW32 /c/users/rahat/downloads
$ git clone https://github.com/RahatMelsov/django-blog-app.git
Cloning into 'django-blog-app'...
fatal: unable to access 'https://github.com/RahatMelsov/django-blog-app.git/': Could not resolve host: github.com
Rahat#Rahat-PC MINGW32 /c/users/rahat/downloads
And when I want to install some kind of module from the NPM using the node.js, it produces such an error:
cmd
C:\Users\Rahat>npm install --save react react-dom
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/react failed, reason: get
addrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Rahat\AppData\Roaming\npm-cache\_logs\2019-09-27T20_29_06_
174Z-debug.log
I think this is because of my proxy, as everywhere this "word" appears. Maybe something wrong with wi-fi?
enter image description here
since the Internet works for me
No it doesn't
But I don’t copy git repositories
As the error message from git explains the problem is not with git but your internet connectivity from your MING subsystem.
If you didn't understand what git was telling you, npm tells you the same thing in different words.
If npm is running natively in MS-Windows rather than under MING, then nothing on the machine can to talk to the internet.
Maybe something wrong with wi-fi?
I thought you said the internet was working for you?
create a .npmrc file if not available and do the proxy setting .
case 1 : your personal or office system where proxy not required.
registry=http://registry.npmjs.org/
case 2 : Office system and proxy required.
registry=link from whihc node packages can be downloaded , say Artifactory.
https_proxy=http://userId:password#proxyIP:Port
https_proxy=http://userId:password#proxyIP:Port
Related
I installed nodeJs and npm using nvm, that went perfectly, then I notice that a newer version of npm was available so i try
npm install -g npm#latest
But then it just stays as like that, it's like it does not start never, so I try another command and this happens
npm install -g n
Same thing, noting happens.
Trying and trying I manage to get the following error:
/home/jonathan/.nvm/versions/node/v18.12.1/bin/npx --yes --package #angular/cli ng new untitled --defaults
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/#angular%2fcli failed, reason: connect ETIMEDOUT 2606:4700::6810:1123:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jonathan/.npm/_logs/2022-12-28T05_07_38_682Z-debug-0.log
Done
So searching on the internet I found the url npm uses to attempt the installs the following:
registry.npmjs.org <
I tried then:
ping registry.npmjs.org
Same as above, it does nothing, it suppose to show some info every few seconds but nothing happens so y put the url in a browser and it works
{"db_name":"registry","engine":"couch_bt_engine","doc_count":3313520,"doc_del_count":332,"update_seq":31421891,"purge_seq":0,"compact_running":false,"sizes":{"active":69891815727,"external":214417993712,"file":70327402736},"disk_size":70327402736,"data_size":69891815727,"other":{"data_size":214417993712},"instance_start_time":"1672130582611333","disk_format_version":7,"committed_update_seq":31421891,"compacted_seq":31421548,"uuid":"3a4ad341a4111dd254daa731f37b37ae"}
That's what it shows.
So. I don't know what it's going on, I'm not using any proxy or firewall. Need some help here.
Update... I try using wifi not wired connection and it works, so the problem appears to be wired connection
Solution remains on network configuration, as Robert says its not related to programming so I'm marking this as answer. Thank any who try to help
I'm using a Mac with the zsh terminal, and I have node v16.13.1 on my machine.
I'm trying to install packages, but I haven't been successful. I get the error below, regardless of what package I try to install. I've also tried initializing first using npm -init, but I still get the same result.
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/figlet failed, reason: Client network socket disconnected before secure TLS connection was established
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/edgaracuna/.npm/_logs/2022-01-02T16_01_32_283Z-debug.log
How can I resolve this issue to be able to install node packages?
I was unable to recreate the issue, so I think this isn't a problem that you can directly solve. Either you have a firewall issue, or maybe the npm servers were down or broken at the time. Just try again later, reboot your computer or join a different wifi network.
I need to install pm2 and pm2-windows-service package globally on a computer without an internet connection. I have tried to save each package as a tarball on my own computer (with internet connection) like this:
npm pack pm2
npm pack pm2-windows-startup
Then I copy both tarball files 'pm2-4.2.3.tgz' and 'pm2-windows-startup-1.0.3.tgz' to the computer without internet connection and try to install globally as follow:
npm i -g pm2-4.2.3.tgz
npm i -g pm2-windows-startup-1.0.3.tgz
But I always have the same error ...
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/#pm2%2fagent failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
Some suggestion to solve that?
According to npm documentation
Global install (with -g): puts stuff in /usr/local or wherever node is installed.
I haven't tried it myself but what I'd try to do is to take the dependency (with all subdependencies) and put it in the directory with your node. Something like <PATH_TO_NODE>/node_modules.
Then take the corresponding file from your local node_modules/.bin and put it in the <PATH_TO_NODE>
If you don't know where your node is installed, you can run this command in the terminal
npm config get prefix
Directories will be different on UNIX systems.
i am trying to install nativescript, i am new to it so i'll appreciate any help..
first , i installed it correctly but after that i saw a page on nativescript site for advanced installation, so i played around with it .. now i cannot run the command tns and cannot uninstall, can`t install..
here is the errors i get:
note: I also updated my nodejs to the newest version , but couldnt update npm , when i tried to run: npm install npm -g i got errors like here:
i also tried rebooting the pc but didn`t help.
i uninstalled node, npm then installed them again .. now i get this error :
ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
ERR! network This is most likely not a problem with npm itself
ERR! network and is related to network connectivity.
ERR! network In most cases you are behind a proxy or have bad network settings.
ERR! network
ERR! network If you are behind a proxy, please make sure that the
ERR! network 'proxy' config is set properly. See: 'npm help config'
ERR! Please include the following file with any support request:
ERR! C:\Users\Home\npm-debug.log
It was a connection problem.
I remember thatI played with proxy configuration by mistake like this :
npm config set proxy http://localhost:8080/
npm config set https-proxy http://localhost:8080/
npm config set strict-ssl false
which made npm client attempts to hit localhost:8080 to pull the module rather than the correct internet endpoint.
so after couple of days of frustration i visited this link
https://docs.npmjs.com/cli/config
then run
npm config edit
which opened a file inside that file i removed those three lines i added above , then everything worked fine.
I'm (very) new to nodejs and raspberry pi.
I'm trying to install the onoff package for a test project, following this tutorial.
Everything works fine and I've set up a new node project using npm init.
Installing onoff (npm install onoff) however fails.
It says:
npm ERR! network getaddrinfo ENOTFOUND npm ERR! network This is most
likely not a problem with npm itself npm ERR! network and is related
to network connectivity. npm ERR! network In most cases you are behind
a proxy or have bad network settings. npm ERR! network npm ERR!
network If you are behind a proxy, please make sure that the npm ERR!
network 'proxy' config is set properly. See: 'npm help config'
I've checked using npm config get proxy, this returns null so I don't think this is a proxy issue.
Anyone who can help me with this?
UPDATE:
ping 74.125.224.72returns "network is unreachable"