I have installed Node.js and when I run the command Node -v it gave me exact version and then I ran npm -v, it replied back with the version.
But when I try to install appium using the command "npm install appium" I have got
npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to
https://registry.npmjs.org/appium failed, reason: getaddrinfo
EAI_AGAIN my.proxyserver.com:8080
can some one tell me why this is happening ?
Connect to Direct Internet like Mobile hotspot or WiFi and try again.
npm install usually fails with corporate proxy.
According to this Microsoft page, this error translates to "A temporary failure in name resolution occurred". Therefore, I suppose you can just try again later. Or, depending on your version of Windows, try this answer. I just tried installing this npm package and it works normally on my Windows 10 box.
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 trying to creating react app using create-react-app command but I get this error message:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/dotenv-expand: Socket timeout
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! C:\Users\IMAD\AppData\Local\npm-cache\_logs\2022-02-12T18_27_46_293Z-debug-0.log
I tried to clean cache:
npm cache clean -f
I also tried restarting the computer and reinstall nodejs and npm, but nothing was fixed.
Can anyone know what is the issue? and how can I solve it?
You should use npx command (not npm) like that as in official documentation : https://reactjs.org/docs/create-a-new-react-app.html
npx create-react-app my-app
After more than 3 days of working on this error, I found the solution and fixed the problem by install another version of Nodejs.
The current version was v16.14.0 when I got this error. And now it's v16.0.0 and everything's is work just fine.
New versions of nodejs are not stable, downgrade to 16.0.0 was the better thing i made.
I solved this using the following command.
npm uninstall -g create-react-app
then
npm install -g create-react-app
After using the computer for a while I cant use npm install anymore. If I restart the computer then all gets back to working.
I am using macOS Mojave 10.14.3 with node v11.12.0 and npm 6.9.0.
Tried the solutions here: npm not working - "read ECONNRESET" but no success
npm i faker
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/faker failed, reason: read ECONNRESET
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/flaviomelo/.npm/_logs/2019-03-28T12_25_35_242Z-debug.log
It is always possible that for a few minutes, NPM was down - so try again now just in case.
But in general, I would start by trying to find where the problem lies.
Try this:
curl https://registry.npmjs.org/faker
That should produce pages and pages of JSON. If it doesn't, then it's possible that your terminal - for whatever reason - cannot access the internet. Comments below this answer have further steps you can try in debugging this.
If it does produce lots of JSON, then there is a problem in your version of NPM / node. As these seem to be the latest, try downgrading each to see if it's a new bug.
you can try these solutions
Solution 1:
MAC + LINUX
run this command with sudo
sudo npm install -g yo
Windows
run cmd as administrator and then run this command again
Solution 2:
run this command and then try
npm config set registry http://registry.npmjs.org/
This is a rather obscure issue. I have an Angular app that will be running through Codeship for CI. However, when it comes time to run npm install on the Codeship box, npm gives back
-npm ERR! fetch failed https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
\npm ERR! fetch failed https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502
\npm ERR! fetch failed https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
npm ERR! Linux 4.2.0-38-generic
npm ERR! argv "/home/rof/.nvm/versions/node/v4.1.1/bin/node" "/home/rof/.nvm/versions/node/v4.1.1/bin/npm" "install"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! fetch failed with status code 502
This was quite strange, since the npm install worked just fine on my box. My first instinct was that it had to be an issue with the NPM repository, so I grabbed the url for the package(https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz) and threw it into a new Chrome tab. Sure enough, the archive downloaded almost instantly. I was confused by this, so I tried the Codeship build again, but got the same results. I decided to SSH into the Codeship box to see if I could access it. I ran
curl https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz
and as I expected I got the 502 error. However, when I ran the same command from the terminal on my machine, I got the same result, even though the npm install ran perfectly for me. I wasn't able to find anyone else having this type of an issue, and a 502 seems like a very rare code for the NPM registry to be returning. Any ideas?
This is a problem with the registry.npmjs.org in some regions.
Here is issue:
https://github.com/npm/npm/issues/13284
Try to keep one registry inside .npmrc file, only one of them works.
The order of registry also does matter. Also try to set:
npm config delete proxy
npm config delete https-proxy
to clean proxy inside terminal.
I'm seeing the same issue via npm install on Ubuntu 14 running on AWS
curl https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.0.tgz
returns 502 Bad Gateway from the ubuntu server, but works fine from local client
There's an open issue at NPM for this:
https://github.com/npm/npm/issues/13284
NPM just acknowledged the issue and they are working on it. Your can track the status at below link.
http://status.npmjs.org
I got this error while publishing my package on npm. After banging my head against the wall for a few hours, I realized I was on mobile hotsopt. I switched to wifi and bang there was my package on npm!
I've been looking at Steroids as an alternative to PhoneGap for performance reasons. I've tried installing it through Terminal, but I don't really know what I'm doing. :)
I've gone through the documentation, but when I run this: steroids create TestApp, I get this error: steroids: command not found.
Also, after installing Node.js and running this line: npm install steroids -g, it outputs lines like this:
npm http GET https://registry.npmjs.org/steroids
npm http 304 https://registry.npmjs.org/steroids
etc. At the end, I get this:
npm ERR! fetch failed https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz
npm ERR! fetch failed https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/MyUser/npm-debug.log
npm ERR! not ok code 0
I have no idea what is going on here, so if you need more details, please let me know. :) Is there something I'm doing wrong? Thanks!
EDIT: I also get this error while the script is being run: npm ERR! registry error parsing json
It's because the NPM registry is currently (as of 11/4/2013 5:44PM eastern time) down. You can check the status on their status page.
Try to install with sudo
sudo npm install steroids -g