Skip to content
New issue

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

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

Already on GitHub? # to your account

Installing detox nukes new React Native project #816

Closed
anchetaWern opened this issue Jul 9, 2018 · 2 comments
Closed

Installing detox nukes new React Native project #816

anchetaWern opened this issue Jul 9, 2018 · 2 comments

Comments

@anchetaWern
Copy link

Description

Not sure why, but everytime I install detox, my project folder is no longer recognized as a valid React Native project. That's a brand new React Native project which I got to run with react-native run-ios and react-native run-android. But right after installing Detox, I get this error:

Command `run-ios` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

I tried to execute npm install and then react-native upgrade to no avail.

Steps to Reproduce

  1. Create a new RN project with:
react-native init ReactNativeTDD  --version react-native@0.55
  1. Install detox:
npm install detox --save-dev
  1. Run the project:
react-native run-ios

At this point, the project folder is no longer recognized as a valid RN project.

I specifically set it to RN version 0.55 because that's the latest RN version supported by Detox.

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 8.0.0
  • React Native: 2.0.1
  • Node: 8.0.0
  • Device: iOS simulator: iPhone 5s
  • Xcode: 9.4
  • macOS: High Sierra 10.13.5

Device and verbose Detox logs

Not applicable. I can't even run the project by normal means. But following the getting started guide (https://github.com/wix/detox/blob/master/docs/Introduction.GettingStarted.md) didn't succeed either.

@noomorph
Copy link
Collaborator

noomorph commented Jul 9, 2018

Not a Detox issue.
Either stick to yarn add instead of npm install, or uninstall yarn.
See: yarnpkg/yarn#5240

@noomorph noomorph closed this as completed Jul 9, 2018
@anchetaWern
Copy link
Author

anchetaWern commented Jul 10, 2018

@noomorph thanks for the quick reply! It's working now. I used yarn to install detox and mocha.
Perhaps update the getting started guide to use yarn instead of npm? To avoid confusion for newcomers like me https://github.com/wix/detox/blob/master/docs/Introduction.GettingStarted.md

@wix wix locked and limited conversation to collaborators Jul 23, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants