Skip to content

Dev env setup

Vitaliy Vlasov edited this page May 28, 2018 · 21 revisions

Prerequisites:

lein, node.js v.8 , cmake, Qt 5.9.1, Qt's qmake available in PATH

Note: add qmake to PATH via export PATH=<QT_PATH>/clang_64/bin:$PATH

Caveats:

  • if npm hangs at some step, check the version. If it's 5.6.0, try downgrading to 5.5.1 via npm install -g [email protected]
  • if status-react/re-natal is not available, try manually installing via npm install re-natal in status-react dir and symlink re-natal to status-react/node_modules/re-natal/index.js
  • also it might happen that metro-bundler is missing, so you'll have to force install it via npm install metro-bundler

To install react-native-cli with desktop commands support:

  1. git clone https://github.com/status-im/react-native-desktop.git
  2. cd react-native-desktop/react-native-cli
  3. npm update
  4. npm install -g

To setup re-natal dev builds of status-react for Desktop:

  1. git clone https://github.com/status-im/status-react.git
  2. cd status-react
  3. git checkout desktop
  4. npm install
  5. lein deps
  6. npm install -g re-natal (if you don't have re-natal already)
  7. ./re-natal use-figwheel
  8. ./re-natal enable-source-maps
  9. In separate terminal tab: npm start (note: it starts react-native packager )
  10. In separate terminal tab: node ./ubuntu_server.js
  11. In separate terminal tab: lein figwheel-repl desktop (note: wait until sources compiled)
  12. In separate terminal tab: react-native run-desktop

Note: react-native run-desktop might give this error:

CMake Error at CMakeLists.txt:18 (add_subdirectory):
  add_subdirectory given source
  "/path/status-react/desktop/../node_modules/react-native-webview-bridge/desktop"
  which is not an existing directory.

Resolve it with npm install react-native-webview-bridge.

The app window will say that it is waiting for Figwheel reload. Press Cmd+R to force reload.

Clone this wiki locally