麻烦发布一个咕噜的插件

时间:2014-01-18 22:46:13

标签: node.js gruntjs

我制作了第一个grunt插件,当我尝试运行npm publish时出现need auth错误,因此我运行npm adduser并在写完我的用户名和密码后得到了这个错误:

npm ERR! Error: default value must be string or number
npm ERR!     at read (/usr/lib/node_modules/npm/node_modules/read/lib/read.js:15:11)
npm ERR!     at readEmail (/usr/lib/node_modules/npm/lib/adduser.js:96:3)
npm ERR!     at loop (/usr/lib/node_modules/npm/lib/adduser.js:33:20)
npm ERR!     at /usr/lib/node_modules/npm/lib/adduser.js:89:5
npm ERR!     at Interface.onLine (/usr/lib/node_modules/npm/node_modules/read/lib/read.js:111:5)
npm ERR!     at Interface.EventEmitter.emit (events.js:95:17)
npm ERR!     at Interface._onLine (readline.js:202:10)
npm ERR!     at Interface._line (readline.js:531:8)
npm ERR!     at Interface._ttyWrite (readline.js:760:14)
npm ERR!     at ReadStream.onkeypress (readline.js:99:10)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

我做错了什么?

我认为我的代码与&#34; adduser&#34;无关。操作,但无论如何,这里是代码:https://github.com/enriquemorenotent/grunt-ini-file

1 个答案:

答案 0 :(得分:2)

这是npm的一个已知错误:https://github.com/npm/npm/issues/4363

使用:npm install npm -g

更新到最新版本的npm

然后删除您的~/.npmrc文件。最后再次运行npm adduser命令。