The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm publish gives a 500 error on PUT
I’m trying to publish my first package, but the npm publish command fails repeatedly.
An error occurred 47 verbose stack at makeError (/home/<myname>/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:329:12) 47 verbose stack at RegClient.<anonymous> (/home/<myname>/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:303:16) 47 verbose stack at Request._callback (/home/<myname>/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:216:14) 47 verbose stack at Request.self.callback (/home/<myname>/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/request/request.js:185:22) 47 verbose stack at emitTwo (events.js:126:13) 47 verbose stack at Request.emit (events.js:214:7) 47 verbose stack at Request.<anonymous> (/home/<myname>/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/request/request.js:1161:10) 47 verbose stack at emitOne (events.js:116:13) 47 verbose stack at Request.emit (events.js:211:7) 47 verbose stack at IncomingMessage.<anonymous> (/home/<myname>/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/request/request.js:1083:12) 47 verbose stack at Object.onceWrapper (events.js:313:30) 47 verbose stack at emitNone (events.js:111:20) 47 verbose stack at IncomingMessage.emit (events.js:208:7) 47 verbose stack at endReadableNT (_stream_readable.js:1064:12) 47 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11) 47 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9) 48 verbose statusCode 500 49 verbose pkgid <pkg-name> 50 verbose cwd /home/<myname>/Projects/<dir> 51 verbose Linux 4.15.0-50-generic 52 verbose argv "/home/<myname>/.nvm/versions/node/v8.11.2/bin/node" "/home/<myname>/.nvm/versions/node/v8.11.2/bin/npm" "publish" 53 verbose node v8.11.2 54 verbose npm v6.4.1 55 error code E500 56 error Registry returned 500 for PUT on https://registry.npmjs.org/<pkg-name>: An error occurred
--dry-run looks ok
I am logged in.
FWIW, the package name is not on npmjs already.
This old message covers a case where the login credentials were stale: https://github.com/npm/npm/issues/6669
In case you have a similar problem, I suggest run
npm login again to eliminate that as a cause.
I tried that, also tried renaming the .npmrc file and logging in again, but still no dice.
What would be some ways to analyze the issue?
(I am out of suggestions, hopefully someone else can help. Good luck!)
I contacted support and apparently I was using a word in my package name that triggered their warning systems (without providing helpful feedback). Anyway, I changed the name and it is published now…
FYI, the original name was