代码之家  ›  专栏  ›  技术社区  ›  user1050619

反应本机watchman未检测到更改

  •  0
  • user1050619  · 技术社区  · 4 年前

    我使用watchman来检测文件中的更改,但是,出于某种原因,每当REACT组件中缺少CSS时,它就会抛出一个常规错误,而不是缺少CSS元素-

    Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

    操作系统MAC

    0 回复  |  直到 4 年前
        1
  •  1
  •   Rakesh Shelar    4 年前

    需要允许从系统首选项中向watchman授予磁盘权限。按照以下步骤操作:

    开放系统首选项->保安及;隐私->隐私->完全磁盘访问->并在具有管理员权限的watchman上标记check