zoukankan      html  css  js  c++  java
  • 【RN】react-native init ***时,出现Cannot find module 'invariant'

    网上有两种说法:

    1、使用国内镜像

      参考:http://blog.sina.com.cn/s/blog_6dca373a0102vyrn.html

      即在命令行下依次输入:

        1)npm config set registry https://registry.npm.taobao.org --global

        2)npm config set disturl https://npm.taobao.org/dist --global

    输入命令后,进入项目的存放目录,再次输入react-native init  项目名

    2、升级npm版本

      参考:https://github.com/facebook/react-native/issues/11327

    在命令行下:

    1)输入npm -v,得到当前版本

    2)输入npm install npm@4.0.3 -g ,升级到新版本

    3)进入项目的存放目录,再次输入react-native init  项目名

  • 相关阅读:
    2017.8.07
    2017.8.05
    2017.8.04
    2017.8.03
    2017.8.02
    2017.8.01
    2017.7.31
    2017.7.29
    2017.7.28
    简易日历
  • 原文地址:https://www.cnblogs.com/mengyan1124/p/6387403.html
Copyright © 2011-2022 走看看