npm查看源
npm config get registry
npm换源
npm config set registry https://registry.npm.taobao.org/
npm恢复源
npm config set registry https://registry.npmjs.org
yarn查看源
yarn config get registry
yarn换源
yarn config set registry https://registry.npm.taobao.org/
yarn恢复源
yarn config set registry https://registry.yarnpkg.com
更换源之后,搜索命令npm search
无法使用,需要使用对应的网页搜索,要使用搜索,删除registry即可。
删除registr代码
npm config delete registry
yarn config delete registry