React Native构建发行版apk发出“进程'命令'npx”以非零退出值1完成的问题

时间:2020-01-01 08:50:23

标签: android react-native

我的项目使用react native。当我在Android Studio 3.5.2上构建版本apk时,我的应用有时会出现问题:

Process 'command 'npx'' finished with non-zero exit value 1 

enter image description here

这里是版本react-native和node

系统:

OS: macOS 10.15.2
CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
Memory: 1.91 GB / 16.00 GB
Shell: 5.7.1 - /bin/zsh

二进制文件:

Node: 12.13.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman

SDK:

iOS SDK:
  Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1

IDE:

Xcode: 11.3/11C29 - /usr/bin/xcodebuild

npmPackages:

react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5

npmGlobalPackages:

react-native-cli: 2.0.1

我不知道为什么?请帮我!!!谢谢。

1 个答案:

答案 0 :(得分:0)

error's screenshot

就我而言,它是在安装react-native-gifted-chat之后发生的,因此请按link进行操作:

  • 转到node_modules / react-native-parsed-text / babel.config.js
  • 第二行// api.cache(true);
  • 关闭Metro Bundler运行yarn run ios
  • 您可能需要运行两次// //“ ios”:“ react-native run-ios”