By venu kumar

2019-09-13 12:39:44 8 Comments

Im trying to run npm install command but i got this error Error: 503 Service Unavailable for npm install command, Can any one please im requesting you to solve this one.

This is actual complete error im getting on error log file

3413 verbose stack Error: 503 Service Unavailable - GET
3413 verbose stack     at res.buffer.catch.then.body (C:\node\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:104:15)
3413 verbose stack     at process._tickCallback (internal/process/next_tick.js:68:7)
3414 verbose statusCode 503
3415 verbose pkgid @ctc/[email protected]^1.0.5
3416 verbose cwd C:\Users\vktest\pro
3417 verbose Windows_NT 10.0.15063
3418 verbose argv "C:\\node\\node.exe" "C:\\node\\node_modules\\npm\\bin\\npm-cli.js" "install"
3419 verbose node v10.16.3
3420 verbose npm  v6.9.0
3421 error code E503
3422 error 503 Service Unavailable - GET
3423 verbose exit [ 1, true ]


@Adiii 2019-09-13 12:45:33

Seems like your npm registry config pointing to some private registry that is down or unavailable.

Try to check npm configuration :

npm config get registry

It should be like :

So update the config which will point to offical registry.

 npm config set registry

@venu kumar 2019-09-16 05:45:40

No @Adil its still showing same error even after i tried npm config set registry this its showing same error

@Adiii 2019-09-16 06:14:30

Are you behind proxy?

@venu kumar 2019-09-16 06:15:08

Yes im behind proxy using with 8080 port

@Adiii 2019-09-16 06:38:50

Then it will not work, try with out proxy or configure accordingly to the proxy

@Adiii 2019-09-16 06:40:29

@venu kumar 2019-09-16 06:46:37

Yes I have configured proxy according to my proxy settings but still I'm facing same issue

@Adiii 2019-09-18 09:40:26

may be issue with proxy, but this common issue behind proxy

@venu kumar 2019-09-18 10:18:47

How can I set proxy I tried with this commands. npm config set proxy domainid:[email protected]:domainport also for https_proxy and npm config set registry

@venu kumar 2019-09-19 07:35:51

I think the problem is with .npmrc file under project. What this file does. When I run npm I sqlite3 it's shown one ipnumber with port with registry which is available on .npmrc file same one

@venu kumar 2019-09-19 11:37:32

@Adil Thank you for your time. Finally it's working

@Olivier 2019-11-26 17:40:26

You may try to set these parameters:

npm config set proxy "http://proxy.url:port/"
npm config set https-proxy "http://proxy.url:port/"
npm config set strict-ssl false
npm config set registry ""

@Stevan Tosic 2019-10-17 11:25:54

There is a good explanation of issue and solution

NPM Error "failed to fetch from registry" when Installing Module

Old/Buggy NPM Version

As you might have noticed from the error message above, the npm version being used is pretty old. In this example we were using Node v0.6.10 and npm v1.1.0-3. This version is known to have some problems with Ubuntu 12.04, so your best bet is to update Node (and npm along with it) to the newest version:

$ sudo npm update npm -g

If you want to re-install completely, you'll first want to completely remove the current Node/npm executables:

$ sudo apt-get purge nodejs npm

Then re-install using a more updated version, like from Nodesource:

$ curl -sL | sudo bash -
$ sudo apt-get install -y nodejs

Or, even better, you can check out this article for a more thorough guide to installing Node.js on Ubuntu.

Can't Download Over HTTPS

For one reason or another, some people can't connect to the registry via HTTPS. This can be fixed by setting the registry to use HTTP instead:

$ npm config set registry
$ npm config set strict-ssl false

This isn't recommended, however, since your packages will then be downloaded insecurely. It would be best to find the actual root cause instead of using a work-around like this.

Corporate Proxy

For many people, the root cause is actually because a proxy is being used on their network. If this is the case, you can use the following commands to set the HTTP and HTTPS proxies:

$ npm config set proxy http://user:[email protected]:8181
$ npm config set https-proxy http://user:[email protected]:8181

This will save the new configurations and should allow you to access the internet with npm.

@Ankit Kumar Rajpoot 2019-09-13 12:51:08

Try this one, In my case, it worked.

npm --registry install karma

@venu kumar 2019-09-16 05:44:58

No its not working @Ankit kumar i tried npm --registry install karma but still showing same error

@Sam 2019-09-13 12:47:54

try using local npm looks like service not available in your country

Related Questions

Sponsored Content

15 Answered Questions

[SOLVED] Sending command line arguments to npm script

34 Answered Questions

[SOLVED] npm throws error without sudo

11 Answered Questions

[SOLVED] What is the --save option for npm install?

  • 2013-10-24 23:54:11
  • Dmitri
  • 692779 View
  • 2081 Score
  • 11 Answer
  • Tags:   node.js npm

25 Answered Questions

[SOLVED] Find the version of an installed npm package

  • 2012-06-10 20:36:27
  • Laurent Couvidou
  • 1219274 View
  • 2235 Score
  • 25 Answer
  • Tags:   node.js package npm

10 Answered Questions

[SOLVED] How to install a previous exact version of a NPM package?

  • 2013-04-08 23:44:51
  • stewart99
  • 691410 View
  • 933 Score
  • 10 Answer
  • Tags:   node.js npm

22 Answered Questions

[SOLVED] Where does npm install packages?

11 Answered Questions

[SOLVED] Why does "npm install" rewrite package-lock.json?

15 Answered Questions

[SOLVED] How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?

  • 2012-02-13 21:25:10
  • Lance Pollard
  • 317783 View
  • 596 Score
  • 15 Answer
  • Tags:   node.js npm

15 Answered Questions

[SOLVED] How to install an npm package from GitHub directly?

15 Answered Questions

[SOLVED] How to list npm user-installed packages?

Sponsored Content