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

2021-12-08 08:21:58 浏览数 (1)

出现的错误是:

代码语言:javascript复制
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

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

代码语言:javascript复制
registry=https://registry.npmjs.org/

0 人点赞