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

Make "react-native start" work on Windows #2989

Closed
wants to merge 2 commits into from
Closed

Make "react-native start" work on Windows #2989

wants to merge 2 commits into from

Conversation

BerndWessels
Copy link
Contributor

This is necessary to run react-native start on Windows.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@mkonicek
Copy link
Contributor

Thanks for doing this!

This way we lose the REACT_PACKAGER_LOG on Mac OS and Linux, @martinbigio is it used for anything?

I think a safer way would be to check for OS and only do this on Windows.

nit: Please keep the indentation.

@mkonicek
Copy link
Contributor

mkonicek commented Oct 1, 2015

@BerndWessels I committed your change in a5463c4, thanks for the fix!

If you want you could make the newWindow branch work on Windows too: react-native run-android calls the function with newWindow set to true. On Mac and Linux this will open a new terminal Window and start the packager in it. On Windows it's currently a no-op so you have to run react-native start manually.

@mkonicek mkonicek closed this Oct 1, 2015
@yeso126
Copy link

yeso126 commented Oct 1, 2015

When I run react-native start I get a watcher took too long to load error, any workaround?

@mkonicek
Copy link
Contributor

mkonicek commented Oct 1, 2015

@yeso126 What version of watchman are you using? Can you tweak the watcher timeout at the line where it throws the error? The file can be found in node_modules. What sometimes fixes this on Mac is simply running watchman --version.

@yeso126
Copy link

yeso126 commented Oct 1, 2015

I'm trying to run react-native start on windows, watchman is not supported

@mkonicek
Copy link
Contributor

mkonicek commented Oct 2, 2015

Ah of course sorry. We're using sane to do file watching. Not sure what causes the watcher to time out on Windows. Can you try increasing the timeout in this file (under your node_modules/react-native)?

https://github.com/facebook/react-native/blob/master/packager/react-packager/src/FileWatcher/index.js#L17

MattFoley pushed a commit to skillz/react-native that referenced this pull request Nov 9, 2015
Crash-- pushed a commit to Crash--/react-native that referenced this pull request Dec 24, 2015
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants