在windows平臺進行react-native開發,在命令行輸入react-native start 或者npm start時,發現服務啓動不起來,打出如下錯誤日誌:html
Watchman: Watchman was not found in PATH. See https://facebook.github.io/watchman/docs/install.html for installation instructions ERROR Watchman was not found in PATH. See https://facebook.github.io/watchman/docs/install.html for installation instructions {"code":"ENOENT","errno":"ENOENT","syscall":"spawn watchman","path":"watchman","spawnargs":["--no-pretty","get-sockname"]} Error: Watchman was not found in PATH. See https://facebook.github.io/watchman/docs/install.html for installation instructions at exports._errnoException (util.js:874:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at doNTCallback2 (node.js:441:9) at process._tickCallback (node.js:355:17) at Function.Module.runMain (module.js:469:11) at startup (node.js:136:18) at node.js:963:3node
在網上查找一番,發現windows平臺不須要watchman。 也有安裝了cygwin,致使系統中有linux命令環境,啓動時誤認的說法,但我本機中並無cygwin環境。react
後來嘗試卸載watchman:npm uninstall -g watchmanlinux
再運行:react-native startgit
成功啓動github