Flow 在 Apple Silicon M1 Mac 上运行良好吗?

问题描述

我在尝试的任何 React Native+Flow 项目中都遇到了共享内存不足。这是日志消息:

[2021-01-16 21:01:45.042] argv=/Users/hugo/Desktop/Admin MacBook/BeneTalk3/node_modules/flow-bin/flow-osx-v0.122.0/flow start --flowconfig-name .flowconfig --temp-dir /tmp/flow /Users/hugo/Desktop/Admin MacBook/BeneTalk3
[2021-01-16 21:01:45.042] lazy_mode=off
[2021-01-16 21:01:45.042] arch=classic
[2021-01-16 21:01:45.042] abstract_locations=off
[2021-01-16 21:01:45.042] max_workers=8
[2021-01-16 21:01:45.042] Failed to use anonymous memfd init
Out of shared memory:
Raised by primitive operation at file "src/heap/sharedMem.ml",line 43,characters 6-40

在英特尔 Mac 上运行良好,但似乎无法在 M1 上运行。

解决方法

此解决方法目前似乎有效:

https://github.com/facebook/flow/issues/8538

[options]
sharedmemory.heap_size=3221225472