How to resolve 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?

In file included from /Users/jayesh/.node-gyp/16.13.2/include/node/node.h:63:
In file included from /Users/jayesh/.node-gyp/16.13.2/include/node/v8.h:30:
/Users/jayesh/.node-gyp/16.13.2/include/node/v8-internal.h:492:38: error: no template named ‘remove_cv_t’ in namespace ‘std’; did you mean ‘remove_cv’?
!std::is_same<Data, std::remove_cv_t>::value>::Perform(data);
~^~~~~~~
remove_cv
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/type_traits:710:50: note: ‘remove_cv’ declared here
template struct _LIBCPP_TEMPLATE_VIS remove_cv
^
1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/jayesh/Documents/GitHub/erpnext/Dev/frappe-bench/apps/frappe/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 21.2.0
gyp ERR! command “/usr/local/bin/node” “/Users/jayesh/Documents/GitHub/erpnext/Dev/frappe-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
gyp ERR! cwd /Users/jayesh/Documents/GitHub/erpnext/Dev/frappe-bench/apps/frappe/node_modules/node-sass
gyp ERR! node -v v16.13.2

Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/bench/commands/make.py”, line 70, in init
init(
File “/usr/local/lib/python3.9/site-packages/bench/utils/render.py”, line 95, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.9/site-packages/bench/utils/system.py”, line 78, in init
get_app(
File “/usr/local/lib/python3.9/site-packages/bench/app.py”, line 361, in get_app
app.install(verbose=verbose, skip_assets=skip_assets)
File “/usr/local/lib/python3.9/site-packages/bench/utils/render.py”, line 110, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.9/site-packages/bench/app.py”, line 192, in install
install_app(
File “/usr/local/lib/python3.9/site-packages/bench/app.py”, line 418, in install_app
bench.run(“yarn install”, cwd=app_path)
File “/usr/local/lib/python3.9/site-packages/bench/bench.py”, line 43, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/usr/local/lib/python3.9/site-packages/bench/utils/init.py”, line 126, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]:

Getting this when trying to setup dev environment in local.

try downgrading your node version, mybe 12.22.8 or such