从10.13升级到Node.js 12.13后无法启动React Native应用

时间:2019-10-23 19:46:26

标签: node.js react-native

我的React Native过去在Nodej 10.13上的0.61.2上运行良好。在react-native run-android上升级到nodejs 12.13.0后出现错误。这是错误:

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1461 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...

FAILURE: Build failed with an exception.

* Where:
Script 'C:\D\code\js\emps_fe6\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 182

* What went wrong:
A problem occurred evaluating script.
> Text must not be null or empty

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* Where:
Script 'C:\D\code\js\emps_fe6\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 182

* What went wrong:
A problem occurred evaluating script.
> Text must not be null or empty

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

    at checkExecSyncError (child_process.js:621:11)
    at execFileSync (child_process.js:639:15)
    at runOnAllDevices (C:\d\code\js\emps_fe6\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (C:\d\code\js\emps_fe6\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at C:\d\code\js\emps_fe6\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.handleAction (C:\d\code\js\emps_fe6\node_modules\@react-native-community\cli\build\index.js:164:9)

./gradlew clean也失败了。升级有什么问题?我应该回滚到nodejs 10.13吗?

0 个答案:

没有答案