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

Errors running yarn add -D detox in a newly created React Native project. #1153

Closed
tranhoangduong1994 opened this issue Feb 13, 2019 · 8 comments

Comments

@tranhoangduong1994
Copy link

tranhoangduong1994 commented Feb 13, 2019

Description

Errors running yarn add -D detox in a newly created React Native project.

Steps to Reproduce

react-native init SomeProject
yarn add -D detox

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 10.0.7
  • React Native: 0.58.4
  • Node: 11.4.0
  • Device: MacBook Pro (Retina, 15-inch, Mid 2014)
  • Xcode: 10.1 (10B61)
  • macOS: Mojave version 10.14.1

Device and verbose Detox logs

yarn add v1.12.3
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "babel-jest > babel-preset-jest > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @jonny/[email protected]" has incorrect peer dependency "react-native@^0.55.0".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning " > [email protected]" has unmet peer dependency "react-dom@^16.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/core@*".
[4/4] 📃 Building fresh packages...
[-/3] ⠁ waiting...
[3/3] ⠁ detox
error /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments:
Directory: /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox
Output:

  • xcodebuild -version
    +++ dirname /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/scripts/build_framework.ios.sh
    ++ dirname /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/scripts
  • detoxRootPath=/Users/macbook/Desktop/ReactNativeTDD/node_modules/detox
    ++ node -p 'require('''/Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/package.json''').version'
  • detoxVersion=10.0.7
    ++ echo 10.0.7
    ++ xcodebuild -version
    ++ shasum
    ++ awk '{print $1}'
  • sha1=e517cddcf195fe14e30126f67c40aa7898e0be01
  • detoxFrameworkDirPath=/Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01
  • detoxFrameworkPath=/Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01/Detox.framework
  • main
  • '[' -d /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01 ']'
  • '[' '!' -d /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01/Detox.framework ']'
  • echo '/Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
    deleting /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01 and trying to rebuild.'
  • rm -rf /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01
    /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01 was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
    deleting /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01 and trying to rebuild.
  • prepareAndBuildFramework
  • '[' -d /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios ']'
  • detoxSourcePath=/Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
  • extractSources /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
  • detoxSourcePath=/Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
  • echo 'Extracting Detox sources...'
  • mkdir -p /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
    Extracting Detox sources...
  • tar -xjf /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/Detox-ios-src.tbz -C /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
  • buildFramework /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
  • detoxSourcePath=/Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src
  • echo 'Building Detox.framework from /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src...'
  • mkdir -p /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01
    Building Detox.framework from /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src...
  • /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/scripts/build_universal_framework.sh /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/ios_src/Detox.xcodeproj /Users/macbook/Library/Detox/ios/e517cddcf195fe14e30126f67c40aa7898e0be01
    child_process.js:642
    throw err;
    ^

Error: Command failed: /Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/scripts/build_framework.ios.sh
at checkExecSyncError (child_process.js:621:11)
at Object.execFileSync (child_process.js:639:13)
at Object. (/Users/macbook/Desktop/ReactNativeTDD/node_modules/detox/scripts/postinstall.js:2:27)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:776:12)

@LeoNatan
Copy link
Contributor

Please post the full log. I can't read this. Thanks

@tranhoangduong1994
Copy link
Author

@LeoNatan What do you mean by full log? That's my entire terminal screen content when I run yarn add --dev detox.

@tranhoangduong1994
Copy link
Author

By the way, I tried downloading Xcode 9.4.1 and ran xcode-select -s /Applications/Xcode\ 9.4.1.app/Contents/Developer. The yarn add command then ran successfully.

@epinnock
Copy link

Bumping this issue I using a similar issue with Xcode 10.1 going to download 9.4 and seeing if I get better results

@LeoNatan
Copy link
Contributor

The full build log is under ~/Library/Detox/ios/{...}/detox_ios.log.

I recommend deleting the entire ~/Library/Detox/ios/ folder so that there is only one build folder when you attempt to reproduce the problem. Then upload the log. Thanks

@Evanion
Copy link

Evanion commented Feb 21, 2019

This seems to be the same as #1092

@LeoNatan
Copy link
Contributor

1092 has now been closed. Try with the latest Detox release.

@no-response
Copy link

no-response bot commented Feb 25, 2019

This issue has been automatically closed because there has been no response to our request for more information from the original author.

@no-response no-response bot closed this as completed Feb 25, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants