Home
Support Forums

Unable to deploy react app from github

All settings are default. My repo is private from github. Using yarn for build.
My relevant log snippet is as follows. Needed help on how to fix this. If you need more information please let me know

12:32:50 AM:   rm -rf "Release/sass.a" && cp -af "Release/obj.target/src/sass.a" "Release/sass.a"
12:32:50 AM:   g++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DBUILDING_NODE_EXTENSION' -I/opt/buildhome/.node-gyp/16.8.0/include/node -I/opt/buildhome/.node-gyp/16.8.0/src -I/opt/buildhome/.node-gyp/16.8.0/deps/openssl/config -I/opt/buildhome/.node-gyp/16.8.0/deps/openssl/openssl/include -I/opt/buildhome/.node-gyp/16.8.0/deps/uv/include -I/opt/buildhome/.node-gyp/16.8.0/deps/zlib -I/opt/buildhome/.node-gyp/16.8.0/deps/v8/include -I../../nan -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++14 -std=c++0x -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw   -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
12:32:50 AM: In file included from /opt/buildhome/.node-gyp/16.8.0/include/node/v8.h:30,
12:32:50 AM:                  from /opt/buildhome/.node-gyp/16.8.0/include/node/node.h:63,
12:32:50 AM:                  from ../../nan/nan.h:58,
12:32:50 AM:                  from ../src/binding.cpp:1:
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/v8-internal.h:488:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
12:32:50 AM:   488 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
12:32:50 AM:       |                                      ^~~~~~~~~~~
12:32:50 AM:       |                                      remove_cv
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/v8-internal.h:488:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
12:32:50 AM:   488 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
12:32:50 AM:       |                                      ^~~~~~~~~~~
12:32:50 AM:       |                                      remove_cv
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/v8-internal.h:488:50: error: template argument 2 is invalid
12:32:50 AM:   488 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
12:32:50 AM:       |                                                  ^
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/v8-internal.h:488:63: error: ‘::Perform’ has not been declared
12:32:50 AM:   488 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
12:32:50 AM:       |                                                               ^~~~~~~
12:32:50 AM: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
12:32:50 AM: ../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
12:32:50 AM:   284 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
12:32:50 AM:       |                                                                                                  ^~~~~~~~~~~~
12:32:50 AM: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
12:32:50 AM: ../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
12:32:50 AM:   320 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
12:32:50 AM:       |                                                                                                  ^~~~~~~~~~~~
12:32:50 AM: In file included from ../../nan/nan.h:58,
12:32:50 AM:                  from ../src/binding.cpp:1:
12:32:50 AM: ../src/binding.cpp: At global scope:
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/node.h:810:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
12:32:50 AM:   810 |       (node::addon_register_func) (regfunc),                          \
12:32:50 AM:       |                                           ^
12:32:50 AM: /opt/buildhome/.node-gyp/16.8.0/include/node/node.h:844:3: note: in expansion of macro ‘NODE_MODULE_X’
12:32:50 AM:   844 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
12:32:50 AM:       |   ^~~~~~~~~~~~~
12:32:50 AM: ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
12:32:50 AM:   358 | NODE_MODULE(binding, RegisterModule);
12:32:50 AM:       | ^~~~~~~~~~~
12:32:50 AM: make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
12:32:50 AM: make: Leaving directory '/opt/build/repo/node_modules/node-sass/build'
12:32:50 AM: gyp ERR! build error
12:32:50 AM: gyp ERR! stack Error: `make` failed with exit code: 2
12:32:50 AM: gyp ERR! stack     at ChildProcess.onExit (/opt/build/repo/node_modules/node-gyp/lib/build.js:262:23)
12:32:50 AM: gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
12:32:50 AM: gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
12:32:50 AM: gyp ERR! System Linux 4.19.167+
12:32:50 AM: gyp ERR! command "/opt/buildhome/.nvm/versions/node/v16.8.0/bin/node" "/opt/build/repo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
12:32:50 AM: gyp ERR! cwd /opt/build/repo/node_modules/node-sass
12:32:50 AM: gyp ERR! node -v v16.8.0
12:32:50 AM: gyp ERR! node-gyp -v v3.8.0
12:32:50 AM: gyp ERR! not ok
12:32:50 AM: Build failed with error code: 1
12:32:50 AM: Error during Yarn install
12:32:50 AM: Build was terminated: Build script returned non-zero exit code: 1
12:32:50 AM: Failing build: Failed to build site
12:32:50 AM: Finished processing build request in 3m31.758568663s

Ok fixed it. The issue was node version. Switched to LTS version 14.17.3 and it worked.