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

NPM login document update conflict #4093

Closed
toddself opened this issue Nov 5, 2013 · 9 comments
Closed

NPM login document update conflict #4093

toddself opened this issue Nov 5, 2013 · 9 comments

Comments

@toddself
Copy link

toddself commented Nov 5, 2013

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
Copy link
Contributor

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
Copy link
Author

toddself commented Nov 7, 2013

@indexzero thank you for the help!

@nicholasf
Copy link

Thanks @indexzero , this just saved me.

@MoOx
Copy link

MoOx commented Dec 11, 2013

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
Copy link

cedx commented Dec 22, 2013

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
Copy link

@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
Copy link

MoOx commented Jan 11, 2014

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

@smikes
Copy link
Contributor

smikes commented Feb 3, 2015

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 as completed Feb 3, 2015
@toddself
Copy link
Author

toddself commented Feb 3, 2015

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

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

No branches or pull requests

8 participants