Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Issue with Node version 16 #25

Open
RicardoLorenzo opened this issue Nov 17, 2021 · 2 comments
Open

Issue with Node version 16 #25

RicardoLorenzo opened this issue Nov 17, 2021 · 2 comments

Comments

@RicardoLorenzo
Copy link

The issue is this:

$ sudo npm install homebridge-openzwave
...
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from /tmp/.node-gyp/16.13.0/include/node/v8.h:30,
npm ERR!                  from ../src/openzwave.hpp:27,
npm ERR!                  from ../src/callbacks.cc:18:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
npm ERR! /tmp/.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’?
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                      ^~~~~~~~~~~
npm ERR!       |                                      remove_cv
npm ERR! /tmp/.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’?
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                      ^~~~~~~~~~~
npm ERR!       |                                      remove_cv
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                                  ^
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
npm ERR!   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR!       |                                                               ^~~~~~~
npm ERR! make: *** [openzwave_shared.target.mk:148: Release/obj.target/openzwave_shared/src/callbacks.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.10.63-v7+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/ricardo/node_modules/openzwave-shared
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-11-17T11_03_22_349Z-debug.log

The workaround is this:

$ sudo CXXFLAGS="--std=c++14" npm i -g homebridge-openzwave

added 5 packages, and audited 6 packages in 4m

found 0 vulnerabilities
@blankenshipz
Copy link

blankenshipz commented Nov 25, 2021

I just ran into this; thanks for posting the workaround!

Edit: I'm still having an issue though the build seems to hang on node-gyp rebuild

@XueningXu
Copy link

@RicardoLorenzo Thanks so much for the workaround! You just saved my day ~~ 😌

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

No branches or pull requests

3 participants