Skip to content

Commit 826058d

Browse files
authored
Add Troubleshooting section to README.md
1 parent e8d9f98 commit 826058d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,23 @@ let styles =
107107
108108
<View style=styles##wrapper />;
109109
```
110+
111+
## Toubleshooting
112+
113+
### `Native module cannot be null` with create-react-native-app
114+
115+
Currently BuckleScript can generate `import * as ReactNative from 'react-native'`, which breaks
116+
create-react-native-app. To get around this you can force BuckleScript to generate CommonJS
117+
modules instead of ES Modules using:
118+
119+
```json
120+
/* bsconfig.json */
121+
{
122+
/* ... */
123+
"package-specs": [
124+
{
125+
"module": "commonjs"
126+
}
127+
]
128+
}
129+
```

0 commit comments

Comments
 (0)