こちらのリンクを読んで、NodeGUIを動かしてみたいと思いましたが、エラーになって解消したので投稿しました
参考リンクによると、この手順のみで簡単にサンプルを起動起動できるとあったのですが、
git clone https://github.com/nodegui/nodegui-starter
cd nodegui-starter
npm install
npm run build
npm start
npm install
の部分でエラーになってしまいました
$ npm install
> @nodegui/qode@1.0.5 postinstall /Users/kengookumura/dev/tmp/nodegui/nodegui-starter/node_modules/@nodegui/qode
> node install.js
Local Qode 1.0.5 archive doesnt exists... Copying Qode from cache...
Extracting binaries...
> @nodegui/nodegui@0.2.1 postinstall /Users/kengookumura/dev/tmp/nodegui/nodegui-starter/node_modules/@nodegui/nodegui
> npm run build:addon
> @nodegui/nodegui@0.2.1 build:addon /Users/kengookumura/dev/tmp/nodegui/nodegui-starter/node_modules/@nodegui/nodegui
> cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile
[
'/usr/local/Cellar/node/12.8.1/bin/node',
'/Users/kengookumura/dev/tmp/nodegui/nodegui-starter/node_modules/.bin/cmake-js',
'compile'
]
info TOOL Using Unix Makefiles generator.
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.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.2.1 build:addon: `cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.2.1 build:addon script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kengookumura/.npm/_logs/2019-09-23T06_00_56_266Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/nodegui@0.2.1 postinstall: `npm run build:addon`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/nodegui@0.2.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kengookumura/.npm/_logs/2019-09-23T06_00_56_858Z-debug.log
エラーを見るとCMakeの実行可能ファイルが見つかりませんといった内容なのなので、ググってみて以下が関係ありそうだったので試してみましたm(_ _)m
C++初心者がMacでCMakeを利用してみる - Qiita
$ brew install cmake
これでnpm install
を実行すると無事に正常終了しました
あとはこちらを実行すると、
npm run build
npm start
nodegui-starterのサンプルのアプリを起動することができました。
バージョン
- macOS Mojave 10.14.6
- node 12.8.1
以上です。失礼しました。m(_ _)m