Building JavaScript bundle often gets stuck at 0%
See original GitHub issueDescription
When the Expo app starts and I click on my project, 1 out of every 3-4 times it gets stuck. This also happens with the same frequency when I have live reloading enabled and save my changes. The text at the bottom of the screen says “Building JavaScript Bundle…” and to the right is written 0.00%. When this happens, I have to restart the project from Expo XDE and shut down the app on my phone and restart it for it to work again.
Expected Behavior
When I reload the app after changing code, or when I start it up, it should finish building the javascript bundle and start my app.
Observed Behavior
The loading indicator gets stuck at 0%.
If there’s an error message, please paste the full terminal output and error message in this code block:
No error message. I can’t even shake the phone so I can get the developer tools.
Environment
Please run these commands in the project folder and fill in their results:
-
npm ls react-native-scripts
: It says empty. -
npm ls react-native
:
UNMET DEPENDENCY react-native@https://github.com/expo/react-native/archive/sdk-23.0.1.tar.gz
npm ERR! missing: react-native@https://github.com/expo/react-native/archive/sdk-23.0.1.tar.gz, required by MYAPPNAME@0.1.0
npm ERR! extraneous: react-native@https://github.com/expo/react-native/archive/sdk-23.0.1.tar.gz FOLDERPATH/app/node_modules/react-native
npm ls expo
:
UNMET DEPENDENCY expo@23.0.6
npm ERR! missing: expo@23.0.6, required by MYAPPNAME@0.1.0
npm ERR! extraneous: expo@23.0.6 FOLDERPATH/app/node_modules/expo
node -v
: v8.7.0npm -v
: 5.5.1yarn --version
: 1.3.2watchman version
: 4.9.0
Also specify:
- Operating system: MacOS High Sierra 10.13.1
- Phone/emulator/simulator & version: iPhone 6s
Here’s my package.json if that’s of any help.
{
"name": "MYAPPNAME",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-jest": "^21.2.0",
"babel-plugin-transform-react-jsx-source": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react-native": "^4.0.0",
"enzyme": "^3.2.0",
"jest": "^21.2.1",
"jest-expo": "^24.0.0",
"prettier": "^1.7.4",
"prettier-eslint": "^8.2.1",
"react-native-scripts": "1.3.1",
"react-test-renderer": "^16.0.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo",
"testPathIgnorePatterns": [
"/node_modules/"
]
},
"dependencies": {
"axios": "^0.16.2",
"expo": "^24.0.0",
"firebase": "^4.5.1",
"lodash": "^4.17.4",
"moment": "^2.19.1",
"prop-types": "^15.6.0",
"react": "16.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
"react-native-autocomplete-input": "^3.4.0",
"react-native-azure-ad": "^0.2.4",
"react-native-img-cache": "^1.5.3",
"react-native-router-flux": "^4.0.0-beta.21",
"react-native-slider": "^0.11.0",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"watchman": "^1.0.0"
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top GitHub Comments
Just got this issue, I can’t build my JS bundle anymore. Deleting node_modules & package-lock.json did not help.
Edit: This stack overflow answer helped: https://stackoverflow.com/a/45477185/4829109 => Delete the content of
/usr/local/var/run/watchman/
There are some problems with watchman. But running
watchman --foreground
in a separate terminal solved the issue with stucked build for me.