nodegui / react-nodegui-starter

Starter repository for react based native desktop apps using react-nodegui
173 stars 31 forks source link

npm install failes on Ubuntu, with solutions #232

Closed samsch closed 3 years ago

samsch commented 3 years ago

When running npm install after cloning on Ubuntu:

If your error includes

info TOOL Using Unix Makefiles generator.
info DIST Downloading distribution files.
http DIST   - https://nodejs.org/dist/v14.4.0/SHASUMS256.txt
http DIST   - https://nodejs.org/dist/v14.4.0/node-v14.4.0-headers.tar.gz
info REP Build has been failed, trying to do a full rebuild.
ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.

You need to run sudo apt install cmake.

If your error includes:

-- Using QT installation for nodegui_core QT_CMAKE_HOME_DIR:/--redacted--/react-nodegui-starter/node_modules/@nodegui/nodegui/miniqt/5.14.1/gcc_64/lib/cmake/Qt5
CMake Error at miniqt/5.14.1/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
  Failed to find "GL/gl.h" in "/usr/include/libdrm".
Call Stack (most recent call first):
  miniqt/5.14.1/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:207 (include)
  miniqt/5.14.1/gcc_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:100 (find_package)
  miniqt/5.14.1/gcc_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  config/qt.cmake:23 (find_package)
  CMakeLists.txt:210 (AddQtSupport)

-- Configuring incomplete, errors occurred!
See also "/--redacted--/react-nodegui-starter/node_modules/@nodegui/nodegui/build/CMakeFiles/CMakeOutput.log".

Then you need to install some OpenGL libs (answer found here: https://stackoverflow.com/questions/58787687/qt-5-12-failed-to-find-gl-gl-h-in-usr-include-libdrm) sudo apt install mesa-common-dev libglu1-mesa-dev

Presumably this should be added to the docs I guess? It's there, I missed it.

a7ul commented 3 years ago

Hmm I think its already there on the docs: https://docs.nodegui.org/docs/guides/getting-started#setting-up-on-linux