itinance / itinance/react-native-fs
Unable to get property RNFSFileTypeRegular of undefined or null reference.
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
I followed the latest react-native-windows get started(https://microsoft.github.io/react-native-windows/docs/getting-started) and `npm install react-native-fs`. Just a **pure boilerplate** react-native 0.65 app.
However `npx react-native run-windows` which supposed to **autolink** react-native-fs seemed **not working** so I did manual linking:
```json
"dependencies": {
"react": "17.0.2",
"react-native": "0.65.1",
"react-native-fs": "^2.18.0",
"react-native-windows": "0.65.2"
},
```
Super simple set up, but I'm getting this `Unable to get property RNFSFileTypeRegular of undefined or null reference.` Error when I try to use RNFS like this:
```JSX
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import type {Node} from 'react';
var RNFS = require('react-native-fs');
...
const App: () => Node = () => {
console.log(RNFS?.DocumentDirectoryPath);
...
};
```
Anyone has similar problem? Any ideas??
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.