React Native:无法读取未定义的属性"RNFSFileTypeRegular"

Soo*_*ran 5 node.js npm react-native

我在我的应用程序中使用https://github.com/itinance/react-native-fs.但在运行时,我收到以下错误消息.

Cannot read property 'RNFSFileTypeRegular' of undefined.

但是克隆并在另一台笔记本电脑上运行的同一个repo工作正常.

使用Mac OS Sierra.

我怀疑这与`node_modules'有关.

尝试卸载节点和npm,仍然是同样的错误.我在这做错了什么?

小智 3

你可以试试:

react-native link react-native-fs
Run Code Online (Sandbox Code Playgroud)

  • 在 Windows UWP 中,我遇到了这个问题..有人知道如何解决这个问题吗?.. (3认同)