Npm build android connect econnrefused

Error: connect ECONNREFUSED 127.0.0.1:80 for Android build #2831

Comments

kgorol commented Oct 26, 2020

Description

Running command expo build:android produces ECONNREFUSED error.

I’ve tried so far deleting node_modules and .expo directories, tried multiple times running expo with expo start -c command, and also performed clean npm install for my project. Nothing helps and I am keep receiving these errors.

Expected Behavior

Successful Android build.

Observed Behavior

Environment

The text was updated successfully, but these errors were encountered:

AdamJNavarro commented Oct 26, 2020

Hey @kgorol, has anything changed with your network environment? Also, are you able to run the project via expo start successfully?

larts85 commented Nov 4, 2020

hello @kgorol !
Did you resolve that problem?
It’s happening the same to me.

kgorol commented Nov 5, 2020

@AdamJNavarro expo start working like a charm, and no changes were made to my network config

@larts85 I did «solve» the issue. It appears to be absolutely random. Steps I am doing to workaround this:

  1. Start application with expo start
  2. Launch app in any simulator (Android or iOS)
  3. Try to launch expo build:android
  4. At this point on your localhost:19002 should appear information that expo lost connection to its server, nothing to worry about.
  5. Repeat step 3 until build starts.

Step 3 should fail a couple of times, but after some retries it successfully starts build.

Источник

npm ERR! code: ‘ECONNREFUSED’, #1887

Comments

CXX22 commented May 2, 2019

Please I need an assistance in fixing my npm usage.

I am using vs code and have installed node js but noticed whenever I try to npm installation on the terminal, I am shown some error notifications. I have updated, set and gotten proxy, set and gotten a registry but still to not avail, I have also cleared the cache but still having same error.

The following are what pops up whenever I try to install using npm:

npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/lite-server failed, reason: connect ECONNREFUSED 10.32.47.71:80
npm ERR! at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:189:13)
npm ERR! at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js 💯 9)
npm ERR! at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:122:5)
npm ERR! at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! < FetchError: request to https://registry.npmjs.org/lite-server failed, reason: connect ECONNREFUSED 10.32.47.71:80
npm ERR! at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:189:13)
npm ERR! at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js 💯 9)
npm ERR! at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:122:5)
npm ERR! at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! message:
npm ERR! ‘request to https://registry.npmjs.org/lite-server failed, reason: connect ECONNREFUSED 10.32.47.71:80’,
npm ERR! type: ‘system’,
npm ERR! errno: ‘ECONNREFUSED’,
npm ERR! code: ‘ECONNREFUSED’,
npm ERR! stack:
npm ERR! ‘FetchError: request to https://registry.npmjs.org/lite-server failed, reason: connect ECONNREFUSED 10.32.47.71:80\n at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)\n at ClientRequest.emit (events.js:189:13)\n at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js 💯 9)\n

Читайте также:  Google translate from android

Please kindly give me the step by step guide in resolving this issue.
caseyviva1@gmail.com

The text was updated successfully, but these errors were encountered:

preveen-stack commented May 4, 2019

@VivaRunor Looks like on your system registry.npmjs.org resolves to 10.32.47.71 which is a private ip address. Can you check your DNS pls.

On my system registry.npmjs.org resolves to 104.16.17.35 a public ip address.

wide4head commented May 7, 2019

Can you please post the results of the following command on your system

On my system the results look like this

PING registry.npmjs.org (104.16.22.35): 56 data bytes
64 bytes from 104.16.22.35: icmp_seq=0 ttl=55 time=27.237 ms
64 bytes from 104.16.22.35: icmp_seq=1 ttl=55 time=23.215 ms
64 bytes from 104.16.22.35: icmp_seq=2 ttl=55 time=24.693 ms
64 bytes from 104.16.22.35: icmp_seq=3 ttl=55 time=23.407 ms

— registry.npmjs.org ping statistics —
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 23.215/24.638/27.237/1.605 ms

CXX22 commented May 7, 2019

@wide4head thanks for the followup.

I tried what you suggested and I was told:
Access denied. Option -C requires administrative privileges.

I did this on vs code terminal and my command prompt terminal. I even run my cmd as an administrator but still denied access

wide4head commented May 7, 2019

@VivaRunor please use lower case letter -c option and not the upper case one

wide4head commented May 7, 2019

@VivaRunor Oh, I forgot that you are on windows.

CXX22 commented May 7, 2019

Alright. Let me try.
Please kindly reach me via email caseyviva1@gmail.com

CXX22 commented May 7, 2019

Although, my system is not having internet presently. There’s a disruption some minutes ago in my server.

I tried ping registry.npmjs.org and was told ping request could not find host registry.npmjs.org

Does ping work without internet plz?

wide4head commented May 7, 2019

@VivaRunor But the whole point of conversing through github comments in the nodejs/help repository is that the conversation is potentially helpful to other people with similar problems.

Sorry. the ping command will not work without the internet 😉

CXX22 commented May 7, 2019

I know.
I wanna share something with you via email so you use to assist me

wide4head commented May 7, 2019

@VivaRunor go ahead and share in the comments so that other people, with far more experience than I have, can potentially help out

wide4head commented May 7, 2019

I think this issue is caused by an unreachable proxy on the local network.

Anybody comes across similar issues, make sure that the proxy server software is up and running on the designated proxy server machine on the local network and is listening to the correct port # as configured in the npm configuration.

More about proxy configuration can be found in
https://docs.npmjs.com/misc/config

CXX22 commented May 8, 2019

With internet, that’s what I got.
@wide4head

Читайте также:  Найти человека поблизости андроид

gireeshpunathil commented Jun 24, 2019

@VivaRunor — is this still an issue?

If so, the fact that registry.npmjs.org is not getting resolved is critically blocking our progress. But unfortunately, I don’t think I can help you here. This issue needs to be diagnosed and resolved with the help of someone with windows system admin skills.

gireeshpunathil commented Jun 24, 2019

@VivaRunor — yes, I see that the last update was more than a month back. is this resolved in between?

gireeshpunathil commented Jun 24, 2019

sorry, I am not. but let me try to contact you through email, if that helps

akbarali0203 commented Aug 13, 2019 •

i had the same issue and the below solution from stackoverflow worked for me.
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/

gireeshpunathil commented Oct 7, 2019

ping @VivaRunor — is this still outstanding?

Abhinav-vats commented Apr 9, 2020

I got the same issue while installing nodemailer
I used the command npm install nodemailer
please help me out

following is what pops up whenever I try to install

npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/nodemailer failed, reason: connect ECONNREFUSED 127.0.0.1:3000npm ERR! at ClientRequest. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:311:20)
npm ERR! at Socket.socketErrorListener (_http_client.js:426:9)
npm ERR! at Socket.emit (events.js:311:20)
npm ERR! at emitErrorNT (internal/streams/destroy.js:92:8)
npm ERR! at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! FetchError: request to http://registry.npmjs.org/nodemailer failed, reason: connect ECONNREFUSED 127.0.0.1:3000
npm ERR! at ClientRequest. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:311:20)
npm ERR! at Socket.socketErrorListener (_http_client.js:426:9)
npm ERR! at Socket.emit (events.js:311:20)
npm ERR! at emitErrorNT (internal/streams/destroy.js:92:8)
npm ERR! at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:84:21) <
npm ERR! message: ‘request to http://registry.npmjs.org/nodemailer failed, reason: connect ECONNREFUSED 127.0.0.1:3000’,
npm ERR! type: ‘system’,
npm ERR! errno: ‘ECONNREFUSED’,
npm ERR! code: ‘ECONNREFUSED’,
npm ERR! stack: ‘FetchError: request to http://registry.npmjs.org/nodemailer failed, reason: connect ECONNREFUSED 127.0.0.1:3000\n’ +
npm ERR! ‘ at ClientRequest. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)\n’ +
npm ERR! ‘ at ClientRequest.emit (events.js:311:20)\n’ +
npm ERR! ‘ at Socket.socketErrorListener (_http_client.js:426:9)\n’ +
npm ERR! ‘ at Socket.emit (events.js:311:20)\n’ +
npm ERR! ‘ at emitErrorNT (internal/streams/destroy.js:92:8)\n’ +
npm ERR! ‘ at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n’ +
npm ERR! ‘ at processTicksAndRejections (internal/process/task_queues.js:84:21)’
npm ERR! >
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! ‘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\abhi\AppData\Roaming\npm-cache_logs\2020-04-09T14_11_25_943Z-debug.log

raedbenz commented Jul 11, 2020 •

still an on going issue with every npm install package or npx package args commands 🙁

givingwu commented Oct 16, 2020

try this command :

we resolved this problem.

erikeckhardt commented Nov 6, 2020

we resolved this problem.

sudo installing of npm packages will just lead to more problems down the road.

The correct answer is to chown all of the folders that npm uses, not to use sudo. Or uninstall npm/node, delete all their folders, and reinstall.

Use of sudo with npm install is actually a security issue, because any random package that you happen to be including could be hacked, and if it detects it has sudo access, it can then do malicious stuff to your computer.

VGerris commented May 23, 2021

The cause is likely 👍
1 — your internet is down
2 — your dns is not resolving properly
3 — your regstry is not pointing to the right registry

Читайте также:  Osmand для андроид все версии

As posted above, run the following:
npm set registry https://registry.npmjs.org

This sets the registry to the main npm registry and if you fix point 1 and 2 it should work.
And please do not post unrelated questions and mark this as resolved if it works, thanks.

pborregg commented Nov 8, 2021

Hello, I don’t have a proxy at all.

I have been «able» to do npm install. I’m using windows 11 pro now as of August 2021

This is what I’m getting:

I didn’t have this problem before. but I had broadband with an ARRIS MODEM, now, I have just internet through the same company Wavebroadband but now, I’m using a different modem and router

Motorola MB8600 DOCSIS 3.1 Cable Modem, 6 Gbps Max Speed. Approved for Comcast Xfinity Gigabit, Cox Gigablast, and More, Black

TP-Link Deco Mesh WiFi System(Deco M3) –Up to 4,500 sq.ft Whole Home Coverage, Replaces WiFi Router/Extender, Plug-in Design, Works with Alexa, 3-Pack

So, I wonder if there’s something I need to open on the modem to make NPM work?

Источник

Node.js Error: connect ECONNREFUSED — how to connect Node with phpMyAdmin

I spend more than 6 hours searching and testing, I get frustrated, angry and you know. just for 3 minutes job.

Here it’s my success story with incredible persistant Node.js error connect ECONNREFUSED .

Day 1.
I run this code, and should work fine.

Oh, but no, some errors

Usual errors, maybe 3-4 minutes. I changed host: ‘localhost’ to host : ‘127.0.0.1’, port: 8080, or maybe 8000, oh yes, 3306 this is. No, not that. Oh, yes, hostname: ‘127.0.0.1:3306’. No. Adding database, remove database. Change every thing I can now change. Nothing.

«You should check if your XAMMP server is running», yes it is green.

Maybe it is the port 8443. node app.js enter, connect ECONNREFUSED. no, it’s not the port. No password, no root, no port. What can solve this?

OOhh, yes, I know, I should thinking about that. Maybe I need to put the project in root XAMPP root folder. No.

connect ECONNREFUSED

3 hours later. I need more music.

Day 2
Today, Sunday, with some first snow outside, I discovered something new. There is an IP address on my XAMPP, and maybe this is how I can solve the error.

Unfortunately it was not the case.

Starting to find the real solution in my case
And after I read Yannick Motton’s best answer on post host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server I found the solution.

The solution:

1. Create an user with password, and grant all provileges
CREATE USER ‘username’@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON . TO ‘username’@’localhost’ WITH GRANT OPTION;
CREATE USER ‘username’@’%’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON . TO ‘username’@’%’ WITH GRANT OPTION;
FLUSH PRIVILEGES;

This will set user: username and pass: password

2. Change localhost with your XAMPP IP (and also add username/password for user and password)

Change host: «localhost» to host:»192.168.64.2″, and update with user: «username», password: «password».
node app + enter

Connection established It’s done. Hooray.

3. Celebrate the victory
Now that your terminal print Connection established, you whould celebrate the victory with dev friends.

Final thoughts

Hope this article will help you to solve the connect ECONNREFUSED error and to connect Node.js with phpMyAdmin in just a few minutes.

“Patience, persistence, and perspiration make an unbeatable combination for success.” — Napoleon Hill

Источник

Оцените статью