更新到 catalina 和 mojave 后流服务器和 vscode 流扩展中断

Flow server and vscode flow extension breaking after updating to catlina and mojave

有人遇到过这个问题吗? Connection to server got closed. Server will not be restarted.

这是我在检出旧提交时得到的,在 locus-dashboard我们确实有旧版本的流程)然后切换回当前的。然后它开始抛出错误 Connection to server got closed. Server will not be restarted..

这是流的日志。

[Info  - 12:03:15 PM - locus-dashboard-v2/.flowconfig] Found flow using option `useNPMPackagedFlow`
[Info  - 12:03:16 PM - locus-dashboard-v2/.flowconfig] Using flow '/Users/shubanusharma/workspace/locus-dashboard-v2/node_modules/flow-bin/flow-osx-v0.111.3/flow' (v0.111.3)
Unhandled exception: (Sys_error "/tmp/daemon_param688afa.bin: Permission denied")
Raised by primitive operation at file "stdlib.ml", line 316, characters 29-55
Called from file "filename.ml", line 259, characters 7-73
Re-raised at file "filename.ml", line 261, characters 30-37
Called from file "hack/utils/sys/daemon.ml", line 267, characters 2-53
Called from file "hack/utils/jsonrpc/jsonrpc.ml", line 215, characters 4-357
Called from file "src/lsp/flowLsp.ml", line 1555, characters 15-36
Called from file "src/commands/commandUtils.ml", line 13, characters 4-32

[Error - 12:03:16 PM] Connection to server got closed. Server will not be restarted.

我已经尝试清理node_modules清除纱线和npm 缓存正在重新安装 扩展。

这似乎是一个 Catalina 权限 问题 运行 flow sudo 适用于流程,但 vscode 扩展 仍然有同样的问题。

不是永久解决方案,但将 tmp 文件夹权限更改为 777 可解决此问题。

  1. 转到您的 repo 目录并停止服务器 yarn flow stop
  2. 更改 /tmp 目录权限 sudo chmod 777 /tmp
  3. 启动流量服务器yarn flow start
  4. 通过cmd+shift+p( windows ctrl+shift+p) 输入restart client 回车

[编辑 2021 年 6 月 15 日]

在大多数情况下,只需授予权限即可,无需停止服务器

此外,这不仅发生在 Catalina 中,而且发生在 Catalina 之后

  • Mac OS卡特琳娜
  • Mac OS 莫哈韦

我发现两者都存在问题