Skip to content

Installation fails when path contains spaces due to using an obsolete version of detox #21539

Closed

Description

@dantman

Environment

  React Native Environment Info:
    System:
      OS: macOS Sierra 10.12.6
      CPU: x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
      Memory: 1.05 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.11.0 - /usr/local/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
      Android SDK:
        Build Tools: 23.0.0, 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.2
        API Levels: 19, 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.0 AI-171.4443003
      Xcode: 9.2/9C40b - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.2 => 0.57.2
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

Installation of react-native with yarn fails when the path to your project contains a space in it anywhere in the directory tree, with this error:

[3/3] ⠄ detox
error /Users/daniel/Workspace/work/Mind Monkey RN/node_modules/react-native/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments:
Directory: /Users/daniel/Workspace/work/Mind Monkey RN/node_modules/react-native/node_modules/detox
Output:
+ xcodebuild -version
+++ dirname /Users/daniel/Workspace/work/Mind Monkey RN/node_modules/react-native/node_modules/detox/scripts/build_framework.ios.sh
usage: dirname path
++ dirname
usage: dirname path
+ detoxRootPath=
child_process.js:632
    throw err;
    ^

This is because of wix/Detox#894. However the detox library has already fixed this bug. The only reason that this is failing is because react-native is depending on an old version of detox.

Activity

  1. kelset commented on Oct 8, 2018

    @kelset
    Contributor

    Yeah I want to upgrade Detox to 9.x too, it seems that it should be fairly trivial, but I didn't have time yet :(

    A PR would surely be appreciated if you can tackle it.

  2. added
    Good first issueInterested in collaborating? Take a stab at fixing one of these issues.
    Help Wanted :octocat:Issues ideal for external contributors.
    on Oct 8, 2018
  3. kelset commented on Oct 8, 2018

    @kelset
    Contributor

    Ended up creating the PR #21570, should be good to go once we fix the other Flow issue that is blocking the CI.

  4. added a commit that references this issue on Oct 11, 2018
  5. rchovatiya88 commented on Apr 4, 2019

    @rchovatiya88

    It seems during the intial install the project is not updating to the latest Detox version.

    I removed the line 118 (where it says "detox": "9.0.4") from the package.json

    then ran the command agian.
    npm install detox --save-dev

    This worked for me 🎉

    Screen Shot 2019-04-04 at 11 24 58 AM

  6. added a commit that references this issue on Jun 17, 2019
  7. locked as resolved and limited conversation to collaborators on Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Help Wanted :octocat:Issues ideal for external contributors.Resolution: LockedThis issue was locked by the bot.🔩Test InfrastructureTest infrastructure and continuous integration.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions