kelp
kelp copied to clipboard
Provide option to not build the GUI
It would be nice if ./scripts/build.sh had an option to ignore the GUI build.
I often run into cases where the GUI will not build due to version conflicts between exact versions of npm, yarn, node, and a host of other things. I don't use the GUI do it would be nice to have the option of only building the kelp binary.
e.g., in v1.12.0, the GUI fails to build for me, because it's trying to use node-gyp to build paltform-specific bindings a specific version of node-sass:
In file included from /home/davek/.node-gyp/16.13.0/include/node/v8.h:30,
from /home/davek/.node-gyp/16.13.0/include/node/node.h:63,
from ../../nan/nan.h:58,
from ../src/binding.cpp:1:
/home/davek/.node-gyp/16.13.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/home/davek/.node-gyp/16.13.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
| ^~~~~~~~~~~
| remove_cv
I'm sure the root cause of the error is on my side, but it would be nice if I could just ignore the GUI build instead of tracking it down.
For the record, yarn simply refuses to install packages correctly for me. I have terrible luck with that package manager. Switching to npm fixes the build:
+++ b/scripts/build.sh
@@ -17,7 +17,7 @@ function install_web_dependencies() {
CURRENT_DIR=`pwd`
cd $CURRENT_DIR/gui/web
- yarn install
+ npm install
check_build_result $?
cd $CURRENT_DIR
@@ -30,7 +30,7 @@ function generate_static_web_files() {
CURRENT_DIR=`pwd`
cd $CURRENT_DIR/gui/web
- yarn build
+ npm build
check_build_result $?
cd $CURRENT_DIR
Build successful:
$ ./bin/kelp version
cli version: master:v1.12.0-dirty
gui version: v1.0.0-rc2
git branch: master
git hash: 01389b845ea88949e81caf96223c8c97eb56ea4a-dirty
build date: 20211126T162722Z
build type: cli
env: dev
GOOS: linux
GOARCH: amd64
For the record,
yarnsimply refuses to install packages correctly for me. I have terrible luck with that package manager.
same here
installing web dependencies ...
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[-----------------------------------------------------------------------------------------------------------------------------------------------] 0/1485./scripts/build.sh: line 15: 15356 Segmentation fault yarn install
build failed with error code 139