【问题标题】:`react-native init app` is not working in React-Native 0.56`react-native init app` 在 React-Native 0.56 中不起作用
【发布时间】:2018-07-05 10:33:59
【问题描述】:

反应原生 0.56

我已经安装了react-native-cli globally,当我尝试使用react-native init myapp 创建一个新项目时,我遇到了一个错误。

这是我面临的错误。

env:- windows 10,node 版本 v10.1.0,npm 版本 6.1.0,react native 版本 0.56

以前的项目运行良好,但无法创建新项目。

【问题讨论】:

  • 哪个错误? ..

标签: react-native npm-install react-native-cli


【解决方案1】:

这是 react-native 版本 0.56 的一个错误
尝试react-native init [YourProject] --version react-native@0.55.4 来初始化旧版本

Source

【讨论】:

    【解决方案2】:

    在Ubuntu下安装watchman就可以了,创建RN APP+

    $ cd ~
    $ git clone https://github.com/facebook/watchman.git
    $ cd watchman/
    $ git checkout v4.7.0
    $ sudo apt-get install -y autoconf automake build-essential python-dev
    $ ./autogen.sh 
    $ ./configure 
    $ make
    $ sudo make install
    
    $ watchman --version
    $ echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches  && echo 999999 | sudo tee -a  /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee  -a /proc/sys/fs/inotify/max_user_instances && watchman  shutdown-server
    

    【讨论】:

      猜你喜欢
      • 2018-11-17
      • 1970-01-01
      • 2017-02-10
      • 2019-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多