• 默认是用yarn进行安装,修改为npm的形式
#通过npx react-native init -h查看得到
npx react-native@latest init AwesomeProject  --pm npm
  • 修改npx的镜像
#使用nrm工具切换淘宝源
npx nrm use taobao
#如果之后需要切换回官方源可使用
npx nrm use npm
  • 修改npm的镜像
npm config set registry https://registry.npmmirror.com
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐