Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

'Cannot publish over existing version', regardless of version #4298

Closed
andy-hanson opened this issue Dec 12, 2013 · 4 comments
Closed

'Cannot publish over existing version', regardless of version #4298

andy-hanson opened this issue Dec 12, 2013 · 4 comments
Labels

Comments

@andy-hanson
Copy link

When I run npm publish in my project, I get the error:

npm ERR! publish fail Cannot publish over existing version.

Updating the version has no effect.

My package is named 'just-the-job'.
When I run 'npm view just-the-job' there is no output.
When I run 'npm unpublish just-the-job --force' I get the error:

npm ERR! Error: conflict Document update conflict.: just-the-job/-rev/1-e8ef740d12f8e80a73f7e567bc02f085

UPDATE: The problem was fixed overnight - all other versions disappeared and I was able to publish version 0.0.0.

@andrewrk
Copy link

this is causing pillarjs/multiparty#39

@bcle
Copy link

bcle commented Dec 12, 2013

Experiencing a similar problem for the past several days. No matter what version in package.json I set, I can't publish. Trying to unpublish and then trying again results in EPUBLISHCONFLICT. Here's the log for the first publish attempt:

ubuntu@ip-10-198-2-200:~/fuse4js$ npm publish
npm http PUT https://registry.npmjs.org/fuse4js
npm http 409 https://registry.npmjs.org/fuse4js
npm http GET https://registry.npmjs.org/fuse4js
npm http 200 https://registry.npmjs.org/fuse4js
npm http PUT https://registry.npmjs.org/fuse4js/0.1.9/-tag/latest
npm http 201 https://registry.npmjs.org/fuse4js/0.1.9/-tag/latest
npm http GET https://registry.npmjs.org/fuse4js
npm http 200 https://registry.npmjs.org/fuse4js
npm http PUT https://registry.npmjs.org/fuse4js/-/fuse4js-0.1.9.tgz/-rev/15-b12feeaea766c494cf4b3abf06a1e7e2
npm http 409 https://registry.npmjs.org/fuse4js/-/fuse4js-0.1.9.tgz/-rev/15-b12feeaea766c494cf4b3abf06a1e7e2
npm ERR! Error: conflict Document update conflict.: fuse4js/-/fuse4js-0.1.9.tgz/-rev/15-b12feeaea766c494cf4b3abf06a1e7e2
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:259:14)
npm ERR!     at Request.init.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/main.js:120:22)
npm ERR!     at Request.EventEmitter.emit (events.js:96:17)
npm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:648:16)
npm ERR!     at Request.EventEmitter.emit (events.js:123:20)
npm ERR!     at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/usr/local/lib/node_modules/npm/node_modules/request/main.js:610:14)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:123:20)
npm ERR!     at IncomingMessage._emitEnd (http.js:366:10)
npm ERR!     at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
npm ERR!     at CleartextStream.socketOnData [as ondata] (http.js:1366:20)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.2.0-52-virtual
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "publish"
npm ERR! cwd /home/ubuntu/fuse4js
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/ubuntu/fuse4js/npm-debug.log
npm ERR! not ok code 0

@papandreou
Copy link

I had the same problem with express-negotiator and npm 1.3.3. The latest version is 0.4.1, and I could not publish 0.4.2:

andreas@papandreou:~/work/express-negotiator$ npm publish
npm http PUT https://registry.npmjs.org/express-negotiator
npm http 201 https://registry.npmjs.org/express-negotiator
npm http GET https://registry.npmjs.org/express-negotiator
npm http 200 https://registry.npmjs.org/express-negotiator
npm http PUT https://registry.npmjs.org/express-negotiator/-/express-negotiator-0.4.2.tgz/-rev/40-0415c7a023e5c606a76459cf36cc028c
npm http 409 https://registry.npmjs.org/express-negotiator/-/express-negotiator-0.4.2.tgz/-rev/40-0415c7a023e5c606a76459cf36cc028c
npm ERR! publish fail Cannot publish over existing version.
npm ERR! publish fail Update the 'version' field in package.json and try again.
npm ERR! publish fail 
npm ERR! publish fail If the previous version was published in error, see:
npm ERR! publish fail     npm help unpublish
npm ERR! publish fail 
npm ERR! publish fail To automatically increment version numbers, see:
npm ERR! publish fail     npm help version

npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "node" "/home/andreas/.local/bin/npm" "--userconfig" "/home/andreas/.npmrc-official" "publish"
npm ERR! cwd /home/andreas/work/express-negotiator
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.3
npm ERR! code EPUBLISHCONFLICT
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/andreas/work/express-negotiator/npm-debug.log
npm ERR! not ok code 0

Updating to npm 1.4.6 fixed it!

@othiym23
Copy link
Contributor

npm < 1.4 did not publish atomically, which meant that sometimes race conditions and other synchronization issues could crop up between the client and the server. Since we've fixed that (and removed the ability to republish the same version of a package), these issues have been addressed, and should only be encountered when running obsolete versions of npm. Closing this issue as resolved!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants