RN安装踩坑

xiaoxiao2021-02-28  116

git clone https://github.com/facebook/react-native.git

git add .        (注:别忘记后面的.,此操作是把Test文件夹下面的文件都添加进来)

git commit  -m  "提交信息"  (注:“提交信息”里面换成你需要,如“first commit”)

git push -u origin master   (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)

npm install -g  失败

http://blog.csdn.net/nickfang/article/details/50148049

修改https 配置为http。

运行

npm config set registry http://registry.npmjs.org/

再运行npm install -g React-native-cli  成功。

react-native init AwesomeProject(初始化项目慢)

warning There appears to be trouble with your network connection. Retrying...

1>找到Node.js的安装目录,进入nodejs\node_modules\npm找到文件npmrc,打开后在该文件末尾加上

registry = https://registry.npm.taobao.org 2>npm config set registry https://registry.npm.taobao.org npm config set disturl https://npm.taobao.org/dist npm install 特别慢 :npm config set registry=http://registry.npm.taobao.org/ 改完后记得测试下: npm info react 可以看到仓库源是淘宝的了 http://blog.csdn.net/coder_nice/article/details/52933187 RN项目安装后红色

转载请注明原文地址: https://www.6miu.com/read-65842.html

最新回复(0)