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

出现的错误是:

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/

Leave a Comment

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