使用“npm publish"失败 [英] Failure using "npm publish"

查看:82
本文介绍了使用“npm publish"失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我维护了 NPM 包 LintRoller:- https://npmjs.org/package/lintroller

I maintain the NPM package LintRoller: - https://npmjs.org/package/lintroller

最近我尝试推送一个新版本,但出现以下错误:

Recently I've tried pushing a new version, but I get the following error:

npm ERR! publish Failed PUT response undefined  
npm ERR! Error: login error  
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:82:22) 
npm ERR!     at CouchLogin.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login/couch-login.js:177:14) n## Heading ##pm ERR!     at CouchLogin.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login/couch-login.js:159:46) 
npm ERR!     at Request.self.callback (/usr/local/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/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/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! 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/bin/node" "/usr/local/bin/npm" "publish"  
npm ERR! cwd /Users/arthurakay/www/PhantomLint  
npm ERR! node -v v0.10.20  
npm ERR! npm -v 1.3.11  
npm ERR!   
npm ERR! Additional logging details can be found in:  
npm ERR!     /Users/arthurakay/www/PhantomLint/npm-debug.log  
npm ERR! not ok code 0

那是在我的 Mac OSX (Mavericks) 终端上使用npm publish".

That is using "npm publish" from my Mac OSX (Mavericks) terminal.

这曾经有效......但我已经尝试了几个月.有什么改变了吗?还是我在本地机器上神秘地丢失了一些登录凭据?

This used to work... but it's been a few months since I tried. Has something changed? Or did I mysteriously loose some login credentials on my local machine?

推荐答案

@robertklep 一针见血.npm login 是关键,虽然我不记得以前必须这样做.谢先生!

@robertklep Hit the nail on the head. npm login was the key, though I don't remember having to do that before. Kudos sir!

这篇关于使用“npm publish"失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆