-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
[N-API] Missing module object at initialization time #26221
Comments
Can you add how you accessed the _module internal variable? |
Sure, here it is the relevant code:
|
After a quick scan of the code I'm not sure how that sets _module but its going to be unintentional... I think the correct way forward is for us to understand what info is needed from the module and see if there is a way to provide that. |
I totally agree that |
@raffaeler why do you need access to |
@gabrielschulhof Here is why: (we can close one of the two threads, not sure which one) |
Going to close this one a duplicate of nodejs/node-addon-api#449 as there is more discussion in the other thread. |
With the legacy api, I obtain the addon module using this code:
Now I found the way to access the
_module
internal variable but it is a plain structure and not aNapi::Value
.The reason for needing the Module is accessing, for example, the full pathname of the C++ addon.
The text was updated successfully, but these errors were encountered: