回答我自己的問題。 This post幫了我。
在這個文件中\ node_modules \反應母語\ node_modules \節點匆忙\ LIB \ FileWatcher \ index.js
- 我不得不增加
MAX_WAIT_TIME
(我我從120000改爲360000)。
- 也不得不改變
這
key: '_createWatcher',
value: function _createWatcher(rootConfig) {
var watcher = new WatcherClass(rootConfig.dir, {
glob: rootConfig.globs,
dot: false
});
return new Promise(function (resolve, reject) {
var rejectTimeout = setTimeout(function() {
return reject(new Error(timeoutMessage(WatcherClass)));
}, MAX_WAIT_TIME);
watcher.once('ready', function() {
clearTimeout(rejectTimeout);
resolve(watcher);
});
});
}
到
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.github.io/watchman/docs/troubleshooting.html',
].join('\n')));
}, MAX_WAIT_TIME);
watcher.once('ready', function() {
clearTimeout(rejectTimeout);
resolve(watcher);
});
});
}
現在這個更改後,改動任何代碼我做,我甚至不具備按R鍵兩次它會自動更改。我希望這可以幫助像我這樣的菜鳥。謝謝。