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

Metro crashes on git pull sometimes #553

Open
asklar opened this issue Apr 29, 2020 · 3 comments
Open

Metro crashes on git pull sometimes #553

asklar opened this issue Apr 29, 2020 · 3 comments

Comments

@asklar
Copy link

asklar commented Apr 29, 2020

Do you want to request a feature or report a bug?
bug

What is the current behavior?
sometimes refreshing my branch will cause metro to crash with this error
image

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.
https://github.com/microsoft/react-native-windows/
(hit this with packages/playground)

What is the expected behavior?
no crash
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
"metro": "^0.58.0",
"metro-config": "^0.58.0",
"metro-core": "^0.58.0",
"metro-react-native-babel-transformer": "^0.58.0",
Windows 10 latest

@papadi
Copy link

papadi commented May 6, 2020

Same here.
image

@motiz88
Copy link
Contributor

motiz88 commented Sep 16, 2020

Hey @asklar @papadi, sorry for the delayed response here. In the long run we are thinking of replacing NodeWatcher with something else on Windows that is more reliable. In the meantime, you may be able to get the file watcher to ignore these problem paths by adding the .git directory and .TMP files to the blockList setting in metro.config.js.

@yume-chan
Copy link

blockList's default value already inlcudes \.git\

const VCS_DIRECTORIES = ['.git', '.hg']
.map(vcs => escapePathForRegex(path.sep + vcs + path.sep))
.join('|');

But it doesn't work, because anymatch package only accepts Linux path separaters (even on Windows)

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

No branches or pull requests

4 participants