windows平台React-Native启动时Watchman was not found
windows平台React-Native启动时Watchman was not found
jimmy2012 发表于2年前
windows平台React-Native启动时Watchman was not found
  • 发表于 2年前
  • 阅读 300
  • 收藏 0
  • 点赞 0
  • 评论 0

移动开发云端新模式探索实践 >>>   

摘要: Watchman: Watchman was not found in PATH.

在windows平台进行react-native开发,在命令行输入react-native start 或者npm start时,发现服务启动不起来,打出以下错误日志:

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:3

在网上查找一番,发现windows平台不需要watchman。 也有安装了cygwin,导致系统中有linux命令环境,启动时误认的说法,但我本机中并没有cygwin环境。

后来尝试卸载watchman:npm uninstall -g watchman

再运行:react-native start

成功启动

  • 打赏
  • 点赞
  • 收藏
  • 分享
共有 人打赏支持
粉丝 0
博文 25
码字总数 2540
×
jimmy2012
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: