{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/11423","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/11423/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/11423/comments","events_url":"https://api.github.com/repos/npm/npm/issues/11423/events","html_url":"https://github.com/npm/npm/issues/11423","id":131494574,"number":11423,"title":"npm publish is failing due to 500 error","user":{"login":"tjmehta","id":640279,"avatar_url":"https://avatars.githubusercontent.com/u/640279?v=3","gravatar_id":"","url":"https://api.github.com/users/tjmehta","html_url":"https://github.com/tjmehta","followers_url":"https://api.github.com/users/tjmehta/followers","following_url":"https://api.github.com/users/tjmehta/following{/other_user}","gists_url":"https://api.github.com/users/tjmehta/gists{/gist_id}","starred_url":"https://api.github.com/users/tjmehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjmehta/subscriptions","organizations_url":"https://api.github.com/users/tjmehta/orgs","repos_url":"https://api.github.com/users/tjmehta/repos","events_url":"https://api.github.com/users/tjmehta/events{/privacy}","received_events_url":"https://api.github.com/users/tjmehta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/bug","name":"bug","color":"A328B3"},{"url":"https://api.github.com/repos/npm/npm/labels/registry","name":"registry","color":"871646"},{"url":"https://api.github.com/repos/npm/npm/labels/support","name":"support","color":"000000"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-02-04T22:38:08Z","updated_at":"2016-04-05T22:20:17Z","closed_at":"2016-02-05T01:13:02Z","body":"Trying to deploy the latest minor version of a public module, and I saw this error twice. Will continue to try...\r\n\r\n```bash\r\n0 info it worked if it ends with ok\r\n1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'publish' ]\r\n2 info using npm@3.3.12\r\n3 info using node@v5.5.0\r\n4 verbose publish [ '.' ]\r\n5 silly cache add args [ '.', null ]\r\n6 verbose cache add spec .\r\n7 silly cache add parsed spec Result {\r\n7 silly cache add   raw: '.',\r\n7 silly cache add   scope: null,\r\n7 silly cache add   name: null,\r\n7 silly cache add   rawSpec: '.',\r\n7 silly cache add   spec: '/Users/tjmehta/Developer/+github/cast-buffer',\r\n7 silly cache add   type: 'directory' }\r\n8 verbose addLocalDirectory /Users/tjmehta/.npm/cast-buffer/1.1.0/package.tgz not in flight; packing\r\n9 info lifecycle cast-buffer@1.1.0~prepublish: cast-buffer@1.1.0\r\n10 silly lifecycle cast-buffer@1.1.0~prepublish: no script for prepublish, continuing\r\n11 verbose tar pack [ '/Users/tjmehta/.npm/cast-buffer/1.1.0/package.tgz',\r\n11 verbose tar pack   '/Users/tjmehta/Developer/+github/cast-buffer' ]\r\n12 verbose tarball /Users/tjmehta/.npm/cast-buffer/1.1.0/package.tgz\r\n13 verbose folder /Users/tjmehta/Developer/+github/cast-buffer\r\n14 verbose addLocalTarball adding from inside cache /Users/tjmehta/.npm/cast-buffer/1.1.0/package.tgz\r\n15 silly cache afterAdd cast-buffer@1.1.0\r\n16 verbose afterAdd /Users/tjmehta/.npm/cast-buffer/1.1.0/package/package.json not in flight; writing\r\n17 verbose afterAdd /Users/tjmehta/.npm/cast-buffer/1.1.0/package/package.json written\r\n18 silly publish { name: 'cast-buffer',\r\n18 silly publish   version: '1.1.0',\r\n18 silly publish   description: 'cast objects, arrays, numbers, and strings to buffers',\r\n18 silly publish   main: 'index.js',\r\n18 silly publish   scripts:\r\n18 silly publish    { test: 'lab --verbose --assert code --threshold 100',\r\n18 silly publish      lint: 'standard' },\r\n18 silly publish   repository:\r\n18 silly publish    { type: 'git',\r\n18 silly publish      url: 'https://github.com/tjmehta/cast-buffer.git' },\r\n18 silly publish   keywords:\r\n18 silly publish    [ 'cast',\r\n18 silly publish      'buffer',\r\n18 silly publish      'string',\r\n18 silly publish      'array',\r\n18 silly publish      'object',\r\n18 silly publish      'to',\r\n18 silly publish      'buffers',\r\n18 silly publish      'objects',\r\n18 silly publish      'arrays',\r\n18 silly publish      'json' ],\r\n18 silly publish   author: { name: 'Tejesh Mehta' },\r\n18 silly publish   license: 'MIT',\r\n18 silly publish   bugs: { url: 'https://github.com/tjmehta/cast-buffer/issues' },\r\n18 silly publish   homepage: 'https://github.com/tjmehta/cast-buffer',\r\n18 silly publish   devDependencies: { code: '^1.5.0', lab: '^5.18.1', standard: '^5.4.1' },\r\n18 silly publish   dependencies: { '101': '^1.2.0', 'assert-args': '^1.0.5' },\r\n18 silly publish   readme: '# cast-buffer [![Build Status](https://travis-ci.org/tjmehta/cast-buffer.svg?branch=master)](https://travis-ci.org/tjmehta/cast-buffer)\\ncast objects, arrays, numbers, and strings to buffers\\n\\n# Installation\\n```bash\\nnpm i --save cast-buffer\\n```\\n\\n# Usage\\n```js\\nvar buff\\n\\nbuff = castBuffer({ \\'foo\\': 1, \\'bar\\': 2 }) // new Buffer(\\'{ \\'foo\\': 1, \\'bar\\': 2 }\\')\\nbuff = castBuffer([ \\'foo\\', \\'bar\\', \\'qux\\' ]) // new Buffer(\\'[ \\'foo\\', \\'bar\\', \\'qux\\' ]\\')\\nbuff = castBuffer(\\'hello\\') // new Buffer(\\'hello\\')\\nbuff = castBuffer(10) // new Buffer(\\'10\\') // stringified number\\nbuff = castBuffer(1.1) // new Buffer(\\'1.1\\') // stringified number\\nbuff = castBuffer(new Buffer(\\'hello\\')) // returns same buffer\\n\\n// Calls toJSON if it exists\\nvar foobar = {\\n  _json: {}\\n  get: function () {/*...*/}\\n  set: function () {/*...*/}\\n  toJSON: function () {\\n    return this._json\\n  }\\n}\\nbuff = castBuffer(foobar) // new Buffer(\\'{}\\')\\nbuff = castBuffer([ foobar ]) // new Buffer(\\'[{}]\\')\\n```\\n\\n# License\\nMIT\\n',\r\n18 silly publish   readmeFilename: 'README.md',\r\n18 silly publish   gitHead: 'acc09eac92e23ceaa04064e5c0d4305d5b4ffdf4',\r\n18 silly publish   _id: 'cast-buffer@1.1.0',\r\n18 silly publish   _shasum: '0f086d2217895821c3bd017c6297428469db42f2',\r\n18 silly publish   _from: '.' }\r\n19 verbose getPublishConfig undefined\r\n20 silly mapToRegistry name cast-buffer\r\n21 silly mapToRegistry using default registry\r\n22 silly mapToRegistry registry https://registry.npmjs.org/\r\n23 silly mapToRegistry uri https://registry.npmjs.org/cast-buffer\r\n24 verbose publish registryBase https://registry.npmjs.org/\r\n25 silly publish uploading /Users/tjmehta/.npm/cast-buffer/1.1.0/package.tgz\r\n26 verbose request uri https://registry.npmjs.org/cast-buffer\r\n27 verbose request sending authorization for write operation\r\n28 info attempt registry request try #1 at 2:32:14 PM\r\n29 verbose request id 255963332c809b0e\r\n30 http request PUT https://registry.npmjs.org/cast-buffer\r\n31 http 500 https://registry.npmjs.org/cast-buffer\r\n32 verbose headers { 'content-type': 'application/json',\r\n32 verbose headers   'cache-control': 'max-age=0',\r\n32 verbose headers   'content-length': '99',\r\n32 verbose headers   'accept-ranges': 'bytes',\r\n32 verbose headers   date: 'Thu, 04 Feb 2016 22:32:28 GMT',\r\n32 verbose headers   via: '1.1 varnish',\r\n32 verbose headers   connection: 'keep-alive',\r\n32 verbose headers   'x-served-by': 'cache-sjc3130-SJC',\r\n32 verbose headers   'x-cache': 'MISS',\r\n32 verbose headers   'x-cache-hits': '0',\r\n32 verbose headers   'x-timer': 'S1454625134.449561,VS0,VE13902' }\r\n33 info retry will retry, error on last attempt: Error: \"no clients remaining. see `.errors` property for each client error.\" : cast-buffer\r\n34 info attempt registry request try #2 at 2:32:38 PM\r\n35 http request PUT https://registry.npmjs.org/cast-buffer\r\n36 http 500 https://registry.npmjs.org/cast-buffer\r\n37 verbose headers { 'content-type': 'application/json',\r\n37 verbose headers   'cache-control': 'max-age=0',\r\n37 verbose headers   'content-length': '99',\r\n37 verbose headers   'accept-ranges': 'bytes',\r\n37 verbose headers   date: 'Thu, 04 Feb 2016 22:32:39 GMT',\r\n37 verbose headers   via: '1.1 varnish',\r\n37 verbose headers   connection: 'keep-alive',\r\n37 verbose headers   'x-served-by': 'cache-lax1421-LAX',\r\n37 verbose headers   'x-cache': 'MISS',\r\n37 verbose headers   'x-cache-hits': '0',\r\n37 verbose headers   'x-timer': 'S1454625158.483258,VS0,VE703' }\r\n38 info retry will retry, error on last attempt: Error: \"no clients remaining. see `.errors` property for each client error.\" : cast-buffer\r\n39 info attempt registry request try #3 at 2:33:39 PM\r\n40 http request PUT https://registry.npmjs.org/cast-buffer\r\n41 http 500 https://registry.npmjs.org/cast-buffer\r\n42 verbose headers { 'content-type': 'application/json',\r\n42 verbose headers   'cache-control': 'max-age=0',\r\n42 verbose headers   'content-length': '99',\r\n42 verbose headers   'accept-ranges': 'bytes',\r\n42 verbose headers   date: 'Thu, 04 Feb 2016 22:33:42 GMT',\r\n42 verbose headers   via: '1.1 varnish',\r\n42 verbose headers   connection: 'keep-alive',\r\n42 verbose headers   'x-served-by': 'cache-lax1428-LAX',\r\n42 verbose headers   'x-cache': 'MISS',\r\n42 verbose headers   'x-cache-hits': '0',\r\n42 verbose headers   'x-timer': 'S1454625219.426012,VS0,VE3544' }\r\n43 verbose request invalidating /Users/tjmehta/.npm/registry.npmjs.org/cast-buffer on PUT\r\n44 error publish Failed PUT 500\r\n45 verbose stack Error: \"no clients remaining. see `.errors` property for each client error.\" : cast-buffer\r\n45 verbose stack     at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)\r\n45 verbose stack     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:252:14)\r\n45 verbose stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)\r\n45 verbose stack     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:198:22)\r\n45 verbose stack     at emitTwo (events.js:100:13)\r\n45 verbose stack     at Request.emit (events.js:185:7)\r\n45 verbose stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1082:10)\r\n45 verbose stack     at emitOne (events.js:95:20)\r\n45 verbose stack     at Request.emit (events.js:182:7)\r\n45 verbose stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1009:12)\r\n46 verbose statusCode 500\r\n47 verbose pkgid cast-buffer\r\n48 verbose cwd /Users/tjmehta/Developer/+github/cast-buffer\r\n49 error Darwin 15.3.0\r\n50 error argv \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"publish\"\r\n51 error node v5.5.0\r\n52 error npm  v3.3.12\r\n53 error code E500\r\n54 error \"no clients remaining. see `.errors` property for each client error.\" : cast-buffer\r\n55 error If you need help, you may report this error at:\r\n55 error     <https://github.com/npm/npm/issues>\r\n56 verbose exit [ 1, true ]\r\n```"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/206008603","html_url":"https://github.com/npm/npm/issues/11423#issuecomment-206008603","issue_url":"https://api.github.com/repos/npm/npm/issues/11423","id":206008603,"user":{"login":"markbirbeck","id":62572,"avatar_url":"https://avatars.githubusercontent.com/u/62572?v=3","gravatar_id":"","url":"https://api.github.com/users/markbirbeck","html_url":"https://github.com/markbirbeck","followers_url":"https://api.github.com/users/markbirbeck/followers","following_url":"https://api.github.com/users/markbirbeck/following{/other_user}","gists_url":"https://api.github.com/users/markbirbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/markbirbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markbirbeck/subscriptions","organizations_url":"https://api.github.com/users/markbirbeck/orgs","repos_url":"https://api.github.com/users/markbirbeck/repos","events_url":"https://api.github.com/users/markbirbeck/events{/privacy}","received_events_url":"https://api.github.com/users/markbirbeck/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T22:20:17Z","updated_at":"2016-04-05T22:20:17Z","body":"Looks like https://github.com/npm/npm/issues/11423#issuecomment-180434036 is pretty much exactly the same as https://github.com/npm/npm/issues/11854#issuecomment-206004316."}}