1
`npm ERR! code ECONNREFUSED
 npm ERR! errno ECONNREFUSED
 npm ERR! FetchError: request to http://registry.npmjs.org/body-parser failed, reason: connect ECONNREFUSED 127.0.0.1:3000`

I tried proxy settings ,registry set commands..But still no use..

Im using node js latest version..and my app listen port is 3000

I tried npm config List..is there any wrong configuration?

 `; cli configs
 metrics-registry = "https://registry.npmjs.org/"
  scope = ""
 user-agent = "npm/5.3.0 node/v8.1.4 win32 ia32"

; userconfig C:\Users\JANEN\.npmrc
https-proxy = "http://proxy.company.com:8080/"
proxy = "http://proxy.company.com:8080/"
registry = "https://registry.npmjs.org/"

; builtin config undefined
prefix = "C:\\Users\\JANEN\\AppData\\Roaming\\npm"

 ; node bin location = C:\Program Files (x86)\nodejs\node.exe
; cwd = C:\project\authenticationIntro-master
; HOME = C:\Users\JANEN
; "npm config ls -l" to show all defaults.

`

Cœur
  • 37,241
  • 25
  • 195
  • 267
Janen R
  • 729
  • 10
  • 21

1 Answers1

0

If you're behind a company proxy, the connection is probably refused because the user authentication fails.

Change the proxy address to "http://username:password@proxy.company.com:port"

This should hopefully solve your problem.

Akash Srivastav
  • 756
  • 5
  • 15