Npm ERR! 503 Service Unavailable


  • nexus 3 = Sonatype Nexus Repository Manager OSS 3.33.1-01
  • node = v14.17.3
  • npm = 6.14.13
  • Zscaler
  • Windows 10

I have definied 3 npm repositories in nexus3:

  • npm-group
  • npm-private
  • npm-registry

I have added in .npmrc :

  • 3 proxies : http-proxy, https-proxy and proxy
  • registry=http://localhost:9081/repository/npm-group/
  • email and _auth
  • always-auth=true

I have added in packages.json :
“publishConfig”: { “registry”: “http://localhost:9081/repository/npm-private/” }

Here is my packages.json

  "name": "wampr_api",
  "version": "1.0.0",
  "description": "WORLDLINE - Report on tests API",
  "main": "index.js",
  "publishConfig" : {
    "registry" : "http://localhost:9081/repository/npm-private/"
  "scripts": {
    "start": "nodemon -L index.js",
    "generate-docs": "node_modules/.bin/jsdoc -c config/jsdoc.json"
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "bcrypt": "^5.0.1",
    "bluebird": "^3.7.2",
    "cors": "^2.8.5",
    "cron": "^1.8.2",
    "csv-parser": "^3.0.0",
    "dateformat": "^4.5.1",
    "dotenv": "^10.0.0",
    "express": "^4.17.1",
    "extract-zip": "^1.6.7",
    "hashmap": "^2.4.0",
    "hashset": "0.0.6",
    "html-pdf": "^3.0.1",
    "mongoose": "^5.13.3",
    "morgan": "^1.10.0",
    "move-file": "^2.1.0",
    "nodemailer": "^6.6.3",
    "nodemon": "^2.0.12",
    "ps-node-promise-es6": "0.0.1",
    "puppeteer": "^10.1.0",
    "request": "^2.88.2",
    "request-promise": "^4.2.6",
    "rotating-file-stream": "^2.1.5",
    "sharp": "^0.28.3",
    "shelljs": "^0.8.4",
    "string-contains": "^0.1.0",
    "substrings": "^1.1.1",
    "xml2js": "^0.4.23",
    "xsd-schema-validator": "^0.7.0"

In order to deploy my package to the NEXUS, I do the npm command : npm publish
But I still get the error :

"npm ERR! code E503 npm ERR! 503 Service Unavailable - PUT http://localhost:9081/repository/npm-private/wampr_api"

2 weeks ago, I could install from the nexus / deploy to the nexus. But now it is not working fine. I can not understand why this issue even if I configure proxy for nexus.

Please can you help me ?

I don’t think the 503 error code would be from Nexus, are you running a proxy server or perhaps some AV scanner perhaps that might be interferring?

I am always running a proxy server (zscaler) and so I add the specific proxy to the zscaler in the .npmrc file.

I do not know what is the AV scanner.

Sorry AV = Anti Virus Scanner.

Basically I’m saying I do not believe the 503 is a status code from Nexus, something between npm and Nexus is returning the 503.


Thank you for your reply and your help !

I have tried to add no-proxy and it is working fine. I can deploy to the nexus

I can publish my package to nexus but I can’t install my package from the nexus.

I have tested npm install mypackage@version with registry=http://localhost:8081/repository/npm-group/ But it is not fine :slight_smile:

c:\WORKSPACE\PROJECTS\WAMPR\TESTAPI>npm install wampr_api@1.0.0
npm ERR! code E404
npm ERR! 404 Not Found - GET http://localhost:8081/repository/npm-group/bcrypt - Not found
npm ERR! 404
npm ERR! 404  'bcrypt@^5.0.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'wampr_api'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

" npm ERR! 404 ‘bcrypt@^5.0.1’ is not in the npm registry. "
==> when replacing with registry=, it is ok
==> when replacing with registry=http://localhost:8081/repository/npm-group/, it is not ok

Can you help me ?

Finally, I can install my package from Nexus because I remove https-proxy from the .npmrc…

I don’t really understand about proxy