Cli: Metro bundler closing after starting up

Created on 18 Dec 2019  路  8Comments  路  Source: react-native-community/cli

When trying to start a new project with npm run android, the app starts to compile, the metro bundler starts for a brief moment and immediately after that it closes without trowing any error. The compilation of the app finishes without errors, but the app can't start since the bundler is not live anymore.

Since the project is new, created with npx react-native the problem has to do with the cli. I saw other issues on github, but they were all related to v2.0.1. When runing npx react-native --version I see that I am running version 3.0.4.

Has this bug not been fixed yet?

Running windows 10 x64 build 18363 with node 13

bug report

All 8 comments

v2.0.1 is a global react-native-cli package that we're not using. Does it work if you run npx react-native start and then run-android?

I tried running react-native start via npm start, only to get the following error:

Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class. Run CLI with --verbose flag for more details.

I guess. The PR is still open, so what can I do about it?

Use yarn resolutions to force a certain version of Metro

Any npm way? Never used yarn before, but I'll try it this there isn't a npm alternative

Yarn resolution didn't solve it either

Found the issue. Had to downgrade to node 12.10.0

Was this page helpful?
0 / 5 - 0 ratings