Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem occurred evaluating settings: Text must not be null or empty #570

Closed
usrbowe opened this issue Jul 22, 2019 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@usrbowe
Copy link

usrbowe commented Jul 22, 2019

Environment

System:
    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 599.25 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
    Yarn: 1.10.1 - ~/.yarn/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.0/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
  IDEs:
    Android Studio: 3.1 AI-173.4819257
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.4 => 0.60.4

Description

After I run react-native run-android, the entire react-native command will break on this line.

// FILE: node_modules/@react-native-community/cli/build/commands/server/middleware/getDevToolsMiddleware.js
var __opn = require('opn');

It seems that this package is not even used, so I fixed this error, by just removing the entire line.
The interesting part is, that I haven't seen this error, when running ios app. It broke completely the first time I run the run-android.

Doesn't seem to be related to this: #468, since I don't have monorepo. android folder is on same level as node_modules.

Log output

When directly running "node ./node_modules/react-native/cli.js config"

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'opn'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/lukaskurucz/Git/app-name/node_modules/@react-native-community/cli/build/commands/server/middleware/getDevToolsMiddleware.js:41:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Gradle error for reference

FAILURE: Build failed with an exception.

* Where:
Script '/Users/lukaskurucz/Git/app-name/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 190

* What went wrong:
A problem occurred evaluating settings 'app-name'.
> 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 0s
@usrbowe usrbowe added the bug Something isn't working label Jul 22, 2019
@thymikee
Copy link
Member

There's no such call in the source and build output on latest version. Please update the @react-native-community/cli.

@usrbowe
Copy link
Author

usrbowe commented Jul 22, 2019

Adding for reference:

Not even cli issue. I was using react-native-debugger
Which has this template:
https://github.com/jhen0409/react-native-debugger/blob/master/npm-package/lib/injectDevToolsMiddleware.tmpl.js
to inject ingetDevToolsMiddleware.js file.
This ultimately break the latest CLI.

@adyang94
Copy link

Was there a resolution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants