我们有一个在64位RHEL6上运行的Nexus 2.11.4-01 PRO实例,它承载了几种类型的存储库。最近,所有NPM存储库都以某种方式被破坏,并且在Windows上使用npm发布NPM包的任何尝试都失败,并出现以下错误:
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! publish Failed PUT 500
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\Programs\\nodejs-0.12.7\\\\node.exe" "D:\\Programs\\nodejs-0.12.7\\node_modules\\npm\\bin\\npm-cli.js" "publish"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! Unexpected token <
npm ERR! <html>
npm ERR! <head>
npm ERR! <title>500 - We reached max level of depth of SBTree but still found nothing, seems like tree is in corrupted state. You should rebuild index related to given query.</title>
npm ERR! <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
npm ERR!
npm ERR! <link rel="icon" type="image/png" href="http://nexus:8081/nexus/favicon.png">
npm ERR! <!--[if IE]>
npm ERR! <link rel="SHORTCUT ICON" href="http://nexus:8081/nexus/favicon.ico"/>
npm ERR! <![endif]-->
npm ERR!
npm ERR! <link rel="stylesheet" href="http://nexus:8081/nexus/static/css/Sonatype-content.css?2.11.4-01" type="text/css" media="screen" title="no title" charset="utf-8">
npm ERR! </head>
npm ERR! <body>
npm ERR! <h1>500 - We reached max level of depth of SBTree but still found nothing, seems like tree is in corrupted state. You should rebuild index related to given query.</h1>
npm ERR! <p>We reached max level of depth of SBTree but still found nothing, seems like tree is in corrupted state. You should rebuild index related to given query.</p>
npm ERR! </body>
npm ERR! </html>
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! D:\somewhere\npm-debug.log
如日志所示,
我们达到了SBTree的最大深度,但仍然没有发现,似乎树处于腐败状态。您应该重建与给定查询相关的索引。
但我找不到如何重建该索引。我试图&#34;修复索引&#34;,&#34;更新索引&#34;,甚至到#34; Expire Cache&#34;来自管理界面,使用应用程序&#34; In Service&#34;和&#34;退出服务&#34;没有任何运气。
有什么想法吗?
答案 0 :(得分:2)
我向支持小组询问了这个问题,并且他们(大约10分钟后很快)回复了以下内容:
重建npm的索引:
- 关闭nexus
- 删除sonatype-work / nexus / db / npm
的内容- 重新启动
- 计划&#34;重建托管的npm元数据&#34;对托管的npm存储库运行的任务
醇>您不需要为代理或组npm存储库执行任何操作, 这些只会在重启后正常工作。
之后它运作正常。
PS:没有任何隶属关系。