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 }}
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
Using node-usb-detection in Electron v8 I get the following warning output:
Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\tim\Documents\Repositories\AppName\node_modules\usb-detection\build\Release\detection.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
Details of how to fix this can be found at the listed issue:
What does this look like for Native Module X?
The amount of work to become "Context Aware" will be different for every module. For native modules that act as proxies for native getters and setters -- i.e. they just expose JS apis to acccess native APIs -- it's normally as easy as adding a NAN_MODULE_WORKER_ENABLED declaration. You can find an example of that in this pull request.
Some modules will need to do cleanup when the context is destroyed to ensure the module doesn't leaking memory or to cause crashes. You can add hooks to clean up after yourself with node::AddEnvironmentCleanupHook A minimal example of this can be found in this pull request.
The text was updated successfully, but these errors were encountered:
Using
node-usb-detection
in Electron v8 I get the following warning output:Electron: Loading non-context-aware native module in renderer: '\\?\C:\Users\tim\Documents\Repositories\AppName\node_modules\usb-detection\build\Release\detection.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
Details of how to fix this can be found at the listed issue:
The text was updated successfully, but these errors were encountered: