-
Notifications
You must be signed in to change notification settings - Fork 992
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
Watchman doesn't work with react-native anymore #479
Comments
Can you try running:
in another window while you try running react native, and share the |
Hey, I've modified Watchman 4.9.0
Watchman 4.7.0
So it seems newer versions of watchman are returning different file paths? (I can still attach that debug log if required) |
if you hack that javascript file to replace |
... I'm not really a javascript guy; presumably something like |
Yes it does work |
For the sake of clarifying what the problem is, can you also try normalizing it the other way?
|
also: how did you track it down to this? Can you share the error you found and where you found it? |
FWIW, f257233 is where this behavior was changed |
The reason I'm asking the above is to assess whether we need to go back to the old behavior to minimize headaches, or whether it is just that react-native's code needs to be fixed up. |
replacing it all with I tracked this down by doing the following.... Running:
So I jumped to the first file in the exception Found it was trying to build an absolute path for the file it was trying to find, so I added a console.log to to figure out what then it was just a hunt to figure out how react-native received the files from watchman I guess this could just be fixed in react-native, but I do wonder what else in the watchman ecosystem depends on windows file paths matching.... |
@cpojer (picking you because you touched that portion of RN most recently!) can you help me (or find me someone that can help me!) understand where the sensitivity to the slashes is coming from within the hasteFS code? Forward slashes and mixtures of forward slashes are fine on windows (you'll notices that node itself is using them in the stack trace in the comment above), so I'd prefer to make RN do the right thing here. |
This is the code that is shared between Jest and react-native-packager: https://github.com/facebook/jest/blob/master/packages/jest-haste-map/src/index.js |
We're chatting about this internally; at the moment we're learning towards making a change in the javascript side of haste/react-native |
Having the same issue |
@iremlopsum @desfero did you try patching react native? |
@jeanlauliac is working on deploying this fix to metro-bundler and react-native with the latest alpha of jest-haste-map. |
@mlabrum nor |
@mlabrum normalizing paths made it work. |
You need to use a regex with |
For me it works if I apply following workarounds: One thing to note is that if you have Jest installed globally, you most likely have to edit the global Lastly you might have to close Watchman so it starts fresh again next run to see results (working turning to failing, or failing turning to working) due to watchman caching etc. |
Adding to @patroza comment, you need to add the |
@JCMais thanks, overlooked that one, made a new PR @ https://github.com/facebook/jest/pull/4018/files |
Are there any out-of-the-box fixes for this yet? |
facebook/metro#2 was closed today; please follow up there if you're continuing to experience these issues! |
I have react 0.50.4 and watchman 4.9 and still encountering this same problem. |
Same here. |
can't install watchman anymore, |
I getting the same problem when i tried watchman --server-encoding=json --persistent log-level debug > debug.log
|
Hey,
I've grabbed the latest watchman from https://ci.appveyor.com/api/projects/wez/watchman/artifacts/watchman.zip?branch=master&job=Environment:+WATCHMAN_WIN7_COMPAT%3D
React-native version: 0.44.2 (latest)
Windows 10
Running react-native with
react-native start
React native on device gives the following error
Cannot find entry file index.android.js in any of the roots ["c:/tmp/test/test/"]
Watchman logs
I can confirm watchman 4.7.0 worked (though it had the symlink issue on windows)
Thanks,
I'm currently digging through RN code trying to see if I can find anything...
The text was updated successfully, but these errors were encountered: