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

Electron rebuild error #127

Open
robertert opened this issue Feb 25, 2025 · 0 comments
Open

Electron rebuild error #127

robertert opened this issue Feb 25, 2025 · 0 comments

Comments

@robertert
Copy link

I am building an electron app on raspberry pi that uses I2C communication protocol. When I add i2c library I get an error when I am using electron-rebuild to build native modules (without it it doesn't work either). I tried different versions of node, different version of the library and clearing cache and nothing seems to be working.

Error message:
In file included from ../../nan/nan.h:3045,
from ../src/i2c.cc:2:
../../nan/nan_scriptorigin.h: In constructor ‘Nan::ScriptOrigin::ScriptOrigin(v8::Localv8::Value)’:
../../nan/nan_scriptorigin.h:36:55: error: no matching function for call to ‘v8::ScriptOrigin::ScriptOrigin(v8::Isolate*, v8::Localv8::Value&)’
36 | v8::ScriptOrigin(v8::Isolate::GetCurrent(), name) {}
| ^
In file included from /home/robertjacak/.electron-gyp/33.4.0/include/node/v8-script.h:20,
from /home/robertjacak/.electron-gyp/33.4.0/include/node/v8-debug.h:10,
from /home/robertjacak/.electron-gyp/33.4.0/include/node/v8-isolate.h:19,
from /home/robertjacak/.electron-gyp/33.4.0/include/node/v8-snapshot.h:9,
from /home/robertjacak/.electron-gyp/33.4.0/include/node/v8-context.h:15,
from /home/robertjacak/.electron-gyp/33.4.0/include/node/v8.h:26,
from /home/robertjacak/.electron-gyp/33.4.0/include/node/node.h:79,
from ../src/i2c.cc:1:
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:64:13: note: candidate: ‘v8::ScriptOrigin::ScriptOrigin(v8::Localv8::Value, int, int, bool, int, v8::Localv8::Value, bool, bool, bool,
v8::Localv8::Data)’
64 | V8_INLINE ScriptOrigin(Local resource_name,
| ^~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:64:39: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Localv8::Value’
64 | V8_INLINE ScriptOrigin(Local resource_name,
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate: ‘constexpr v8::ScriptOrigin::ScriptOrigin(const v8::ScriptOrigin&)’
62 | class V8_EXPORT ScriptOrigin {
| ^~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate expects 1 argument, 2 provided
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate: ‘constexpr v8::ScriptOrigin::ScriptOrigin(v8::ScriptOrigin&&)’
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate expects 1 argument, 2 provided
../../nan/nan_scriptorigin.h: In constructor ‘Nan::ScriptOrigin::ScriptOrigin(v8::Localv8::Value, v8::Localv8::Integer)’:
../../nan/nan_scriptorigin.h:42:52: error: no matching function for call to ‘v8::ScriptOrigin::ScriptOrigin(v8::Isolate*, v8::Localv8::Value&, int)’
42 | , To<int32_t>(line).FromMaybe(0)) {}
| ^
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:64:13: note: candidate: ‘v8::ScriptOrigin::ScriptOrigin(v8::Localv8::Value, int, int, bool, int, v8::Localv8::Value, bool, bool, bool,
v8::Localv8::Data)’
64 | V8_INLINE ScriptOrigin(Local resource_name,
| ^~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:64:39: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Localv8::Value’
64 | V8_INLINE ScriptOrigin(Local resource_name,
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate: ‘constexpr v8::ScriptOrigin::ScriptOrigin(const v8::ScriptOrigin&)’
62 | class V8_EXPORT ScriptOrigin {
| ^~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate expects 1 argument, 3 provided
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate: ‘constexpr v8::ScriptOrigin::ScriptOrigin(v8::ScriptOrigin&&)’
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate expects 1 argument, 3 provided
../../nan/nan_scriptorigin.h: In constructor ‘Nan::ScriptOrigin::ScriptOrigin(v8::Localv8::Value, v8::Localv8::Integer, v8::Localv8::Integer)’:
../../nan/nan_scriptorigin.h:50:54: error: no matching function for call to ‘v8::ScriptOrigin::ScriptOrigin(v8::Isolate*, v8::Localv8::Value&, int, int)’
50 | , To<int32_t>(column).FromMaybe(0)) {}
| ^
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:64:13: note: candidate: ‘v8::ScriptOrigin::ScriptOrigin(v8::Localv8::Value, int, int, bool, int, v8::Localv8::Value, bool, bool, bool,
v8::Localv8::Data)’
64 | V8_INLINE ScriptOrigin(Local resource_name,
| ^~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:64:39: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Localv8::Value’
64 | V8_INLINE ScriptOrigin(Local resource_name,
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate: ‘constexpr v8::ScriptOrigin::ScriptOrigin(const v8::ScriptOrigin&)’
62 | class V8_EXPORT ScriptOrigin {
| ^~~~~~~~~~~~
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate expects 1 argument, 4 provided
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate: ‘constexpr v8::ScriptOrigin::ScriptOrigin(v8::ScriptOrigin&&)’
/home/robertjacak/.electron-gyp/33.4.0/include/node/v8-message.h:62:17: note: candidate expects 1 argument, 4 provided
make: *** [i2c.target.mk:124: Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/home/robertjacak/Documents/BoxerCardioDesktop/node_modules/i2c-bus/build'
Error: make failed with exit code: 2
at ChildProcess. (/home/robertjacak/Documents/BoxerCardioDesktop/node_modules/@electron/node-gyp/lib/build.js:215:23)

An unhandled rejection has occurred inside Forge:
Error: node-gyp failed to rebuild '/home/robertjacak/Documents/BoxerCardioDesktop/node_modules/i2c-bus'
at ChildProcess. (/home/robertjacak/Documents/BoxerCardioDesktop/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:121:24)
at ChildProcess.emit (node:events:518:28)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)

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

1 participant