docs/extending/node-apis.mdx
Flipper plugins must be designed to work inside browsers.
For that reason, you should avoid using Node.JS APIs directly (with, for example, modules like fs, child_process, path), or packages that depend on the plugins.
The most important Node APIs can be found by using getFlipperLib() (exposed by the flipper-plugin package). Please note that these APIs are all promisified:
fs - use getFlipperLib().remoteServerContext.fs instead.child_process - use getFlipperLib().remoteServerContext.childProcess.exec. Note that this API is intended for short lived processes only.path - use import {path} from 'flipper-plugin' instead.os - use getFlipperLib().environmentInfo.os instead.
getFlipperLib().paths.homePath and similar.In the future, these APIs may be subject to further security / permission restrictions to better sandbox plugins.