今天使用npm search的时候出现了一段错误

0
(0)

出现的错误是:

yangyan-mac-pro:~ yangyan$ npm search grunt
npm WARN search fast search endpoint errored. Using old search.
npm WARN Failed to read search cache. Rebuilding
npm WARN Building the local index for the first time, please be patient
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "search" "grunt"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0

npm ERR! No search sources available
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!     /Users/yangyan/.npm/_logs/2017-04-23T07_26_56_966Z-debug.log

网上说是因为使用了阿里云的npm注册点导致的,目前还不知道什么问题,有可能是阿里云的registry不支持新版本的npm?

修改配置文件 `/usr/local/etc/npmrc` 为使用官方的registry后正常:

registry=https://registry.npmjs.org/

这篇文章有用吗?

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位评论此文章。

很抱歉,这篇文章对您没有用!

让我们改善这篇文章!

告诉我们我们如何改善这篇文章?

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据