android - 在 docker 中找不到 Watchman,但 react-native 成功构建了包
问题描述
我正在使用reactnativecommunity/react-native-android docker图像在 gitlab-ci 中构建一个 react-native android 应用程序。如果我理解正确,react-native 需要watchman
构建捆绑包。
但我注意到它watchman
没有安装在 docker 映像上,我也没有将它安装在.gitlab-ci.yml
. 此外,当我添加which watchman
orwatchman watch-del-all
时.gitlab-ci.yml
,它返回watchman: command not found
.
但是 react-native 是如何构建捆绑包的呢?
解决方案
在 yml 脚本中,您必须安装 watchman。以下是相同的步骤
- apt-get --quiet install --yes autoconf automake build-essential
- apt-get --quiet install --yes python-dev libtool pkg-config libssl-dev
- git clone https://github.com/facebook/watchman.git
- cd watchman
- git checkout v4.9.0
- ./autogen.sh
- ./configure --enable-lenient
- make
- make install
- cd ..
- watchman --version
推荐阅读
- docker - docker-compose.yml - 无法通过浏览器连接到应用程序
- c# - 当发布也构建时,为什么我们将构建和发布分为两个步骤?
- ansible - Ansible Tower 工作流暂停执行
- laravel - Laravel 获取当前用户数据的问题
- php - Google AppEngine PHP 连接 MySQL 失败
- android - 找不到 Gradle DSL 方法:'setApplicationId()'
- android - Android使用的c代码的open部分出现错误
- angular - 用于在角度 5 中延迟加载组件的结构指令
- c# - 如何将自定义属性添加到依赖项跟踪?
- php - 如何在laravel中合并一个数组元素?