Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

NPM login document update conflict #4093

Closed
toddself opened this Issue · 9 comments

8 participants

@toddself

Trying to login:

npm http PUT https://registry.npmjs.org/-/user/org.couchdb.user:toddself
npm http 409 https://registry.npmjs.org/-/user/org.couchdb.user:toddself
npm http GET https://registry.npmjs.org/-/user/org.couchdb.user:toddself
npm http 200 https://registry.npmjs.org/-/user/org.couchdb.user:toddself
npm http PUT https://registry.npmjs.org/-/user/org.couchdb.user:toddself/-rev/12-3bb9d772447d12aae5223425144341f6
npm http 409 https://registry.npmjs.org/-/user/org.couchdb.user:toddself/-rev/12-3bb9d772447d12aae5223425144341f6
npm ERR! Error: conflict Document update conflict.: -/user/org.couchdb.user:toddself/-rev/12-3bb9d772447d12aae5223425144341f6
npm ERR!     at RegClient.<anonymous> (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR!     at Request.self.callback (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/request/request.js:129:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/request/request.js:873:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/request/request.js:824:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
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 Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.21/bin/node" "/usr/local/bin/npm" "login"
npm ERR! cwd /Users/todd/src/conde/cn-cookie
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/todd/src/conde/cn-cookie/npm-debug.log
npm ERR! not ok code 0
@indexzero

FYI. One-liner work-around:

npm config set _auth `node -e "console.log(new Buffer('your_username:your_password').toString('base64'));"`

This is related to npm/npm-registry-couchapp#125 when dealing with replications of _users and public_users. Death to public_users!

@toddself

@indexzero thank you for the help!

@nicholasf

Thanks @indexzero , this just saved me.

@MoOx

I just try the workaround but I'm still unable to publish

❯ npm publish
npm ERR! need auth auth and email required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`

...
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
@cedx

Same problem here: every NPM command that need authentication fail (even with @indexzero hack) !
I can do npm install but no chance to make these commands work : npm login, npm star, npm publish...

Output of npm login command:

npm http PUT https://registry.npmjs.org/-/user/org.couchdb.user:cedx
npm http 409 https://registry.npmjs.org/-/user/org.couchdb.user:cedx
npm http GET https://registry.npmjs.org/-/user/org.couchdb.user:cedx
npm http 200 https://registry.npmjs.org/-/user/org.couchdb.user:cedx
npm http PUT https://registry.npmjs.org/-/user/org.couchdb.user:cedx/-rev/7-100bc1ef42a9e1647f4b655d1afc28da
npm http 409 https://registry.npmjs.org/-/user/org.couchdb.user:cedx/-rev/7-100bc1ef42a9e1647f4b655d1afc28da
npm ERR! Error: conflict Document update conflict.: -/user/org.couchdb.user:cedx/-rev/7-100bc1ef42a9e1647f4b655d1afc28da
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:877:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:828:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
[...]
@bdharrington7

@MoOx This might help: https://gist.github.com/coolaj86/1318304
You have to set up your info and then make sure to npm adduser

Also, I was running into a lot of issues, didn't try indexzero's hack, but since this was my first time publishing I tried this:

I initially wanted my version to be 0.0.1 because it was the first iteration... but I guess npm wasn't having any of that; I changed the package.json file to version 0.0.0 and npm publish was happy

@MoOx

Thanks @bdharrington7, I figured out by myself (but forgot to mention it here).
I confirm this works like you said.

@smikes

Is this still a problem for you?

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and open a new issue!)

Thanks!

@toddself toddself closed this
@toddself

No this has been totally resolved for like a year now ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.