nan: nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
i am not sure i am posting this in the correct place, but i am facing the below issue and i am not sure how to proceed further on this.
appreciate any push in the right direction.
⠙ Building module: node-pty, Completed: 0In file included from ../../nan/nan.h:180,
from ../src/unix/pty.cc:20:
../../nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
55 | typedef v8::Local<v8::AccessorSignature> Sig;
| ^~~~~~~~~~~~~~~~~
../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
55 | typedef v8::Local<v8::AccessorSignature> Sig;
|
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 16
- Comments: 16 (2 by maintainers)
Commits related to this issue
- bump nan The previous version had a bug that complained about 'AccessorSignature' not being part of v8, as reported here: https://github.com/nodejs/nan/issues/942 — committed to sleepyfran/tree-sitter-fsharp by sleepyfran 4 years ago
- Fix macOS nan_callbacks.h issue https://github.com/nodejs/nan/issues/942 — committed to BienGudBoy/Y2TB-Bot by BienGudBoy 3 years ago
- update nan 2.15 -> 2.18 fixes crash seen in https://github.com/nodejs/nan/issues/942 — committed to peterkos/tree-sitter-swift by peterkos 3 years ago
- update nan 2.15 -> 2.18 fixes crash seen in https://github.com/nodejs/nan/issues/942 — committed to alex-pinkus/tree-sitter-swift by peterkos 3 years ago
If someone is wondering Node.JS 20 build failure use similar approach as above with updated version since some package did not update it on their latest like:
sharpThis solved it for me https://stackoverflow.com/questions/61657685/npm-doesnt-install-node-gyp-error-class-v8object-has-no-member-named-for
It just upgrades the libraries in package.json to the latest versions
A PR has already been sent to fix this - https://github.com/nodejs/nan/pull/941.
It works for me if I use yarn
@RichardFoss I didn’t follow that approach and it works in my case. This is what I did:
Add a resolution into the package.json (in the root of the repository if it’s a monorepo):
Add patch-package package to apply a patch after
npm install:I am using a midi package. Recently I updated to node v 18.10.0 and nw v0.69.1. When I rebuild: nw-gyp rebuild --target=0.69.1 --arch=x64 I get: …/…/nan/nan_callbacks.h:55:23: error: no member named ‘AccessorSignature’ in namespace ‘v8’ typedef v8::Localv8::AccessorSignature Sig;
Let’s keep this open for now. It will get closed automatically when the PR lands!
Confirmed, this PR fix my problem when rebuild electron with node-pty.
Same problem when trying to compile for Electron v20