I had the same problem and I found several solutions. The following works for me:
To enable reboot with versions <0.25
- go to file:
yourProjectFolder//node_modules/react-native/local-cli/server/server.js- Mark the line (62): process.exit (11) -> //process.exit(11)
About paragraph 2: I'm not sure when the solution is 2.1., But I think ~ react-native v.33. Please correct this if someone knows for sure. For you, just see if index.js is found in 2. or 2.1. way.
2.1 ( Old path to the FileWatcher index.js file ) Go to the file:yourProjectFolder//node_modules/react-native/node_modules\node-haste\lib\FileWatcher\index.js"
2.2 ( New path to FileWatcher index.js file ) Go to file:yourProjectFolder\node_modules\react-native\packager\react-packager\src\node-haste\FileWatcher\index.js
STEP 1 for 2.1 + 2.2:
Increaseat the top of the file index.js: MAX_WAIT_TIME=120000>MAX_WAIT_TIME=360000- Change
function (_createWatcher)to:
2 2.1 ( index.js)
key: '_createWatcher',
value: function _createWatcher(rootConfig) {
var watcher = new WatcherClass(rootConfig.dir, {
glob: rootConfig.globs,
dot: false
});
return new Promise(function (resolve, reject) {
const rejectTimeout = setTimeout(function() {
reject(new Error([
'Watcher took too long to load',
'Try running `watchman version` from your terminal',
'https://facebook.imtqy.com/watchman/docs/troubleshooting.html',
].join('\n')));
}, MAX_WAIT_TIME);
watcher.once('ready', function () {
clearTimeout(rejectTimeout);
resolve(watcher);
});
});
}
2 2.2 ( index.js)
_createWatcher(rootConfig) {
var watcher = new WatcherClass(rootConfig.dir, {
glob: rootConfig.globs,
dot: false
});
return new Promise(function (resolve, reject) {
const rejectTimeout = setTimeout(function() {
reject(new Error([
'Watcher took too long to load',
'Try running `watchman version` from your terminal',
'https://facebook.imtqy.com/watchman/docs/troubleshooting.html',
].join('\n')));
}, MAX_WAIT_TIME);
watcher.once('ready', function () {
clearTimeout(rejectTimeout);
resolve(watcher);
});
});
}
. , , .