You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’ #942
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;
|
Reacted by westlakem, Kav Singh, Nikita Kot, CryptoManiac, Hans Beck, Griffin Wiebel, Warun C. ⚡, Jaroslaw Weber, Mohamed Magdy, Peter Kos and 6 more
Same problem when trying to compile for Electron v20
Building module: fsuipc, Completed: 0D:\devl\electron\fsecosystem\node_modules\nan\nan_callbacks.h(55,23): error C2039: 'AccessorSignature': is not a member of 'v8' [D:\devl\electron\fsecosystem\node_modules\fsuipc\build\fsuipc.vcxproj]
C:\Users\Matt\.electron-gyp\20.0.1\include\node\v8.h(71): message : see declaration of 'v8' [D:\devl\electron\fsecosystem\node_modules\fsuipc\build\fsuipc.vcxproj]
same problem, using electron-rebuild to rebuild a native module which uses nan for Electron v20 and getting nan_callbacks.h(55,23): error C2039: 'AccessorSignature': is not a member of 'v8' and similar errors related to AccessorSignature
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;
I have looked at various resolutions to the issue in this thread. I have tried putting this into the midi package.json:
"overrides": {
"nan": "github:jkleinsc/nan#remove_accessor_signature"
},
But still get the same message. Any suggestions?
It just upgrades the libraries in package.json to the latest versions
Reacted by Barnabás BARTHA, FarazAhmed47, Marcelo Filho, mattmatt.world , Kunal Khandelwal, Denis Diachkov, Johnny Halfmoon, walderich, Tomas Nesrovnal, Maxim Mai and 3 more
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: sharp
"resolutions": {
"nan": "2.18.0"
},
Reacted by Patrick Costa, William L, Timothy Baumgartner, Bill Harding, Vignesh M, Kevin C, Lane White and Tomáš Konrády
Reacted by Yann Brelière, Jared Forsyth, William L, Nathan Probst, Gabe Reis, Calum Sieppert, Kevin Graf and Charlie Lefrak
Activity
westlakem commentedon Aug 12, 2022
Same problem when trying to compile for Electron v20
nikitakot commentedon Aug 17, 2022
same problem, using
electron-rebuildto rebuild a native module which usesnanfor Electron v20 and gettingnan_callbacks.h(55,23): error C2039: 'AccessorSignature': is not a member of 'v8'and similar errors related toAccessorSignatureRaisinTen commentedon Aug 18, 2022
A PR has already been sent to fix this - #941.
chouzz commentedon Aug 19, 2022
Confirmed, this PR fix my problem when rebuild electron with node-pty.
Abdullah-Albinali commentedon Aug 19, 2022
confirmed as well! thank!
RaisinTen commentedon Aug 19, 2022
Let's keep this open for now. It will get closed automatically when the PR lands!
alejandroclaro commentedon Oct 7, 2022
In case someone is looking for workarounds until this is fixed, take a look to: electron/electron#35193
RichardFoss commentedon Oct 7, 2022
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;
alejandroclaro commentedon Oct 7, 2022
@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:RichardFoss commentedon Oct 8, 2022
Thanks for this comprehensive comment! I have gone down a different path now after feedback from the midi group. I am using an updated midi implementation - read here - https://github.com/julusian/node-midi#readme, and this is working well for me! The nan issue is not present with this implementation.
bump nan
zzikkzzakk commentedon Feb 1, 2023
This 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
idemax commentedon Apr 5, 2023
same here :/
StepanPetei commentedon May 1, 2023
how to add this patch and where?
Fix macOS nan_callbacks.h issue
jaroslaw-weber commentedon Sep 21, 2023
still happens when tried to move to pnpm...
tuwilof commentedon Oct 12, 2023
It works for me if I use yarn
update nan 2.15 -> 2.18
update nan 2.15 -> 2.18
Cheprer commentedon Nov 17, 2023
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:
sharpFix build for Node20 and update from 16.x to 20.19.5