Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

yarn install error #804

Open
gonrocha opened this issue Jul 22, 2022 · 3 comments
Open

yarn install error #804

gonrocha opened this issue Jul 22, 2022 · 3 comments

Comments

@gonrocha
Copy link

While installing Sylius following this instructions, 'yarn install' fail with these errors:

.node-gyp/16.16.0/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
....
.node-gyp/16.16.0/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
....
error: ‘::Perform’ has not been declared

I will appreciate if you can tell me if I'm doing something wrong or it is an issue?

Thank you in advance,

@elboletaire
Copy link

Same issue here. Installing from the docker container does not give any issues, but when trying a standalone install I face with this same problem.

Here are my specs, in case they show something significative:
OS: Arch linux (under WSL)
node version: 16.17.0
yarn: 1.12.19
devel packages (like make) installed through base-devel

Error output (only the last lines, where the error first appears):

Show full output 👇🏼
/home/elboletaire/.node-gyp/16.17.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>::value>::Perform(data);
      |                                      ^~~~~~~~~~~
      |                                      remove_cv
/home/elboletaire/.node-gyp/16.17.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>::value>::Perform(data);
      |                                      ^~~~~~~~~~~
      |                                      remove_cv
/home/elboletaire/.node-gyp/16.17.0/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
  492 |             !std::is_same>::value>::Perform(data);
      |                                                  ^
/home/elboletaire/.node-gyp/16.17.0/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
  492 |             !std::is_same>::value>::Perform(data);
      |                                                               ^~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:284:80: 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]
  284 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
      |                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:320:80: 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]
  320 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
      |                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cpp: At global scope:
/home/elboletaire/.node-gyp/16.17.0/include/node/node.h:859:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local, v8::Local, void*)’} [-Wcast-function-type]
  859 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elboletaire/.node-gyp/16.17.0/include/node/node.h:893:3: note: in expansion of macro ‘NODE_MODULE_X’
  893 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
  358 | NODE_MODULE(binding, RegisterModule);
      | ^~~~~~~~~~~
make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/home/elboletaire/src/wit/sylius/node_modules/node-sass/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/elboletaire/src/wit/sylius/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.4.72-microsoft-standard-WSL2
gyp ERR! command "/home/elboletaire/.nvm/versions/node/v16.17.0/bin/node" "/home/elboletaire/src/wit/sylius/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/elboletaire/src/wit/sylius/node_modules/node-sass
gyp ERR! node -v v16.17.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

@elboletaire
Copy link

Ok, this is the same error than Sylius/Sylius#14224

apparently gulp-sass needs an update, as stated here: nodejs/node#38367

As a workaround, you can install stuff by using:

CXXFLAGS="--std=c++14" yarn 

Instead of just yarn (or yarn install..)

@DeH4eG
Copy link

DeH4eG commented Oct 18, 2022

Or just use node 14.x

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants