启动react-native脚手架和项目后报错:

error: bundling failed: Error: `fsevents` unavailable (this watcher can only be used on Darwin)

原因分析:没有正确安装react-native依赖watchman

初次安装使用的是

npm i watchman -g

安装完会提示你npm 已经不支持watchman了,下载后的文件夹下只有package.json和readme.md两个文件

所以这种方式安装是不行的

 

成功安装的方式是使用homebrew包管理工具下载安装watchman 

brew install watchman

 

当然前提是你需要先安装homebrew软件包管理工具,官网上提供的方法如下

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

 

相关文章:

  • 2021-07-20
  • 2022-12-23
  • 2021-10-25
  • 2021-04-25
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-09
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
相关资源
相似解决方案