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

Node 18 incompatible with outdated version of nan #241

Open
cywang117 opened this issue Oct 31, 2022 · 1 comment · May be fixed by #242
Open

Node 18 incompatible with outdated version of nan #241

cywang117 opened this issue Oct 31, 2022 · 1 comment · May be fixed by #242

Comments

@cywang117
Copy link

cywang117 commented Oct 31, 2022

Attempting npm i with Node 18 fails with:

node_modules/nan/nan_typedarray_contents.h:34:43: error: ‘class v8::ArrayBuffer’ has no member named ‘GetContents’
...
make: *** [dbus.target.mk:134: Release/obj.target/dbus/src/dbus.o] Error 1
make: Leaving directory '/home/christina/github/node-dbus/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/christina/github/node-dbus/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.19.0-76051900-generic
gyp ERR! command "/home/christina/.nvm/versions/node/v18.10.0/bin/node" "/home/christina/github/node-dbus/node_modules/.bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/christina/github/node-dbus
gyp ERR! node -v v18.10.0
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /home/christina/github/node-dbus
npm ERR! command failed
npm ERR! command sh -c -- npm run build:release

Whereas npm i with Node 16 succeeded without issue. The source of the issue is that GetContents was replaced with GetBackingStore in 2019. After upgrading nan with npm i nan@latest (2.17.0 at time of issue creation), npm i with Node 18 succeeded. Can nan be bumped to latest? Looking at the commit in nan where GetBackingStore was introduced, there shouldn't be any backwards compatibility issues.

EDIT: I tried to make a PR but this repo doesn't seem to allow outside contributors?

@cywang117
Copy link
Author

@Shouqun Any input?

@cywang117 cywang117 linked a pull request Nov 12, 2022 that will close this issue
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 3, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue.

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 3, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 3, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue.

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 4, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 4, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue.

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 4, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 10, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 10, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 16, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 16, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
pipex added a commit to balena-os/balena-supervisor that referenced this issue Aug 17, 2023
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
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

Successfully merging a pull request may close this issue.

1 participant