npm adduser报错Unable to authenticate?
registry是https://registry.npmjs.org/,npm和node都升级最新版本了,还是没有用,请问是什么原因啊?
------更新日志文件
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\office\\node.exe',
1 verbose cli 'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'adduser' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose npm-session 188287595600020d
5 verbose login before first PUT { _id: 'org.couchdb.user:flash',
5 verbose login name: 'flash',
5 verbose login password: 'XXXXX',
5 verbose login type: 'user',
5 verbose login roles: [],
5 verbose login date: '2018-02-28T02:32:52.205Z' }
6 http request → PUT https://registry.npmjs.org/-/user/org.couchdb.user:flash
7 http 401 ← Unauthorized (https://registry.npmjs.org/-/user/org.couchdb.user:flash)
8 verbose adduser before first PUT { _id: 'org.couchdb.user:flash',
8 verbose adduser name: 'flash',
8 verbose adduser password: 'XXXXX',
8 verbose adduser email: '469509244@qq.com',
8 verbose adduser type: 'user',
8 verbose adduser roles: [],
8 verbose adduser date: '2018-02-28T02:32:54.215Z' }
9 http request → PUT https://registry.npmjs.org/-/user/org.couchdb.user:flash
10 http 401 ← Unauthorized (https://registry.npmjs.org/-/user/org.couchdb.user:flash)
11 verbose stack Error: Unable to authenticate, need: Basic
12 verbose statusCode 401
13 verbose cwd C:\Users\Administrator\Desktop\work\menu-vue
14 verbose Windows_NT 10.0.14393
15 verbose argv "D:\\office\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "adduser"
16 verbose node v8.9.4
17 verbose npm v5.6.0
18 error code EAUTHIP
19 error Unable to authenticate, need: Basic
20 verbose exit [ 1, true ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
很简单的问题,npm这个报错我也是服了,就是flash这个用户名被注册过了,换一个就好了,我解决了在这里记录一下,怕以后忘了...
我的这个Unable to authenticate, need: Basic 是因为username 需要 ~开头,登录的时候漏了,所以报这个错误,估计你这个问题也差不多少了个~
npm@6.4.1 也报这个错,更新到 npm@6.9.0 可以正常登陆。
怎么解决的这个问题?