在React-Native 0.56中,“react-native init app”无法工作。

3

React Native 0.56

我已经全局安装了react-native-cli,但是当我尝试使用react-native init myapp创建新项目时,出现了错误。

这就是我遇到的错误:

screenshot

环境:Windows 10操作系统,Node版本v10.1.0,NPM版本6.1.0,React Native版本0.56

之前的项目都能够正常运行,但是无法创建新项目。


哪个错误? - hellow
2个回答

8

这是关于React Native 0.56版本的一个错误。
尝试使用以下命令来初始化旧版本:react-native init [YourProject] --version react-native@0.55.4

来源


1
在Ubuntu中安装watchman,您可以这样做,这将解决您创建RN APP +< 56的问题:
$ 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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接