React deploy fail

Hello,
I am trying to build a react app. it works fine on local but when I deploy it using Netlify, I get issues.
This is my log:

3:18:46 PM: In file included from /opt/buildhome/.node-gyp/16.13.0/include/node/v8.h:30,
3:18:46 PM:                  from /opt/buildhome/.node-gyp/16.13.0/include/node/node.h:63,
3:18:46 PM:                  from ../../nan/nan.h:58,
3:18:46 PM:                  from ../src/binding.cpp:1:
3:18:46 PM: /opt/buildhome/.node-gyp/16.13.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
3:18:46 PM: /opt/buildhome/.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’?
3:18:46 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
3:18:46 PM:       |                                      ^~~~~~~~~~~
3:18:46 PM:       |                                      remove_cv
3:18:46 PM: /opt/buildhome/.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’?
3:18:46 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
3:18:46 PM:       |                                      ^~~~~~~~~~~
3:18:46 PM:       |                                      remove_cv
3:18:46 PM: /opt/buildhome/.node-gyp/16.13.0/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
3:18:46 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
3:18:46 PM:       |                                                  ^
3:18:46 PM: /opt/buildhome/.node-gyp/16.13.0/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
3:18:46 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
3:18:46 PM:       |                                                               ^~~~~~~
3:18:46 PM: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
3:18:46 PM: ../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]
3:18:46 PM:   284 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
3:18:46 PM:       |                                                                                                  ^~~~~~~~~~~~
3:18:46 PM: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
3:18:46 PM: ../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]
3:18:46 PM:   320 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
3:18:46 PM:       |                                                                                                  ^~~~~~~~~~~~
3:18:46 PM: In file included from ../../nan/nan.h:58,
3:18:46 PM:                  from ../src/binding.cpp:1:
3:18:46 PM: ../src/binding.cpp: At global scope:
3:18:46 PM: /opt/buildhome/.node-gyp/16.13.0/include/node/node.h:821: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]
3:18:46 PM:   821 |       (node::addon_register_func) (regfunc),                          \
3:18:46 PM:       |                                           ^
3:18:46 PM: /opt/buildhome/.node-gyp/16.13.0/include/node/node.h:855:3: note: in expansion of macro ‘NODE_MODULE_X’
3:18:46 PM:   855 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
3:18:46 PM:       |   ^~~~~~~~~~~~~
3:18:46 PM: ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
3:18:46 PM:   358 | NODE_MODULE(binding, RegisterModule);
3:18:46 PM:       | ^~~~~~~~~~~
3:18:46 PM: make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
3:18:46 PM: make: Leaving directory '/opt/build/repo/node_modules/node-sass/build'
3:18:46 PM: gyp ERR! build error
3:18:46 PM: gyp ERR! stack Error: `make` failed with exit code: 2
3:18:46 PM: gyp ERR! stack     at ChildProcess.onExit (/opt/build/repo/node_modules/node-gyp/lib/build.js:262:23)
3:18:46 PM: gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
3:18:46 PM: gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
3:18:46 PM: gyp ERR! System Linux 4.19.167+
3:18:46 PM: gyp ERR! command "/opt/buildhome/.nvm/versions/node/v16.13.0/bin/node" "/opt/build/repo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
3:18:46 PM: gyp ERR! cwd /opt/build/repo/node_modules/node-sass
3:18:46 PM: gyp ERR! node -v v16.13.0
3:18:46 PM: gyp ERR! node-gyp -v v3.8.0
3:18:46 PM: gyp ERR! not ok
3:18:46 PM: Build failed with error code: 1
3:18:46 PM: Error during Yarn install
3:18:46 PM: Build was terminated: Build script returned non-zero exit code: 1
3:18:46 PM: Failing build: Failed to build site
3:18:46 PM: Finished processing build request in 3m54.891367751s

Hey there,

Thanks so much for reaching out. Have you checked out this Support Guide? It contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, your site name, what your build settings are, your package.json, etc. Thanks!