установить @ response-native-community / netinfo - PullRequest
0 голосов
/ 13 января 2020

Я установил пакет @act-native-community / netinfo в реактивный проект, но при выполнении появится следующая ошибка. Пожалуйста, помогите мне

PS C:\Users\Mohsen\Desktop\irantimesheet> npx react-native run-android
warn Your project is using deprecated "rnpm" config that will stop working from next release. Please use a "react-native.config.js" file to configure the React Native CLI. Migration guide: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 875 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
* daemon not running; starting now at tcp:5037
* daemon started successfully
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
:ReactNative:Unexpected empty result of running 'npx.cmd --quiet --no-install react-native config' command from 'null' directory.
:ReactNative:Running 'npx.cmd --quiet --no-install react-native config' command from 'null' directory failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\Mohsen\Desktop\irantimesheet\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 170

* What went wrong:
A problem occurred evaluating script.
> Command `config` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

* 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 11s

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
:ReactNative:Unexpected empty result of running 'npx.cmd --quiet --no-install react-native config' command from 'null' directory.
:ReactNative:Running 'npx.cmd --quiet --no-install react-native config' command from 'null' directory failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\Mohsen\Desktop\irantimesheet\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 170

* What went wrong:
A problem occurred evaluating script.
> Command `config` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

* 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 11s

    at checkExecSyncError (child_process.js:610:11)
    at execFileSync (child_process.js:628:15)
    at runOnAllDevices (C:\Users\Mohsen\Desktop\irantimesheet\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Command.handleAction (C:\Users\Mohsen\Desktop\irantimesheet\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)

Следует отметить, что при удалении пакета проект работает хорошо

...