在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