balena-io-modules / drivelist

List all connected drives in your computer, in all major operating systems
Apache License 2.0
239 stars 90 forks source link

Loading non-context-aware native module in renderer #373

Closed xiaoxiangmoe closed 3 years ago

xiaoxiangmoe commented 4 years ago

(node:82420) Electron: Loading non-context-aware native module in renderer: '/Users/foo/repos/app/node_modules/drivelist/build/Release/drivelist.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.

warpdesign commented 3 years ago

This happens because the drivelist hasn't been made non-context-aware.

Changing NODE_MODULE(DriveList, tInitAll) to NAN_MODULE_WORKER_ENABLED(DriveList, tInitAll) in drivelist.cpp should fix the problem.

zvin commented 3 years ago

fixed in #378