Skip to content

Commit 2a76c43

Browse files
committed
Added info about QtWebKit issue to troubleshooting doc
1 parent 2da6e05 commit 2a76c43

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/Troubleshooting.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ These are some common issues you may run into while setting up React Native Qt.
44
Downgrade to version 5.5.1: `npm install -g [email protected]`.
55

66
### `react-native run desktop` complaining about missing `qmldir`:
7-
```Command failed: ./build.sh -e "node_modules/react-native-i18n/desktop;node_modules/react-native-config/desktop;node_modules/react-native-fs/desktop;node_modules/react-native-http-bridge/desktop;node_modules/react-native-webview-bridge/desktop;modules/react-native-status/desktop"
7+
8+
```
9+
Command failed: ./build.sh -e "node_modules/react-native-i18n/desktop;node_modules/react-native-config/desktop;node_modules/react-native-fs/desktop;node_modules/react-native-http-bridge/desktop;node_modules/react-native-webview-bridge/desktop;modules/react-native-status/desktop"
810
Error copying directory from "/path-to-status-react/node_modules/react-native/ReactQt/runtime/src/qmldir" to "/path-to-status-react/desktop/lib/React".
911
make[2]: *** [lib/CMakeFiles/copy-qmldir] Error 1
1012
make[1]: *** [lib/CMakeFiles/copy-qmldir.dir/all] Error 2
1113
make: *** [all] Error 2
1214
```
15+
1316
Can be solved by re-running `npm install react-native` which put the `ReactQt/runtime/src/qmldir` file back.
1417

1518
### Missing web3 package issue
1619

1720
After last upgrade of react-native-desktop to the v.0.53.3 of original react-native appeared some incompatibility between `react-native` and `web3` packages on npm install. Initially it installed usually fine, but after `react-native desktop` command execution `web3` package is get removed from `node_modules`. Manual install of web3 by `npm install web3` installs `web3` package, but removes `react-native` package. Workaround or solution?
1821

1922
### ReactButton.qml non-existent property "elide" error upon startup
23+
2024
```
2125
qrc:/qml/ReactButton.qml:33: Error: Cannot assign to non-existent property "elide"
2226
"Component for qrc:/qml/ReactWebView.qml is not loaded"
@@ -25,4 +29,17 @@ QQmlComponent: Component is not ready
2529
"Can't create QML item for componenet qrc:/qml/ReactWebView.qml"
2630
"RCTWebViewView" has no view for inspecting!
2731
```
32+
2833
Solution: make sure that QtWebEngine components are installed.
34+
35+
### Could not find a package configuration file provided by "Qt5WebKit"
36+
For Mac and Linux `react-native-desktop` uses Qt WebEngine module to implement `WebView` component.
37+
38+
Ufortunately Qt doesn't support Qt WebEngine on Windows with MinGW, only with MSVC. And so far `react-native-desktop` supports only MinGW builds.
39+
40+
To overcome this problem on Windows we have `WebView` implemented with QTWebKit. But this module is outdated and not installed with Qt by default.
41+
Currently there is [issue opened](https://github.com/status-im/react-native-desktop/issues/222) to support MSVC on Windows. That will eventually fix the problem.
42+
43+
Until MSVC supported you have 2 options:
44+
- Build QT5WebKit locally. Process described here - https://github.com/MaxRis/webkit/wiki/Building-QtWebKit-on-Windows-(Conan)
45+
- Disable dependency on Qt5WebKit by changing this CMake option - https://github.com/status-im/react-native-desktop/blob/master/CMakeLists.txt#L28 (probably, you will need manually to clean up all generated CMake cache files to allow new option value to be applied correctly). You wont't be able to use `WebView`, but all other components will work.

0 commit comments

Comments
 (0)