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

[Bug] Drivelist incompatible with new V8 engines (V8 > 8.3) #379

Open bennymeg opened 3 years ago

bennymeg commented 3 years ago

Drivelist incompatible with Electron 10+ (latest compatible version: Electron 9).

failed to recompile or throwing the following error:

Module did not self-register: '\\?\C:\Users\FelixDocuments\Code\Keynote\node_modules\drivelist\build\Release\drivelist.node'.
    at process.func [as dlopen] (electron/js2c/asar.js:140:31) 
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1196:18)
    at Object.func [as .node] (electron/js2c/asar.js:140:31)   
    at Module.load (internal/modules/cjs/loader.js:981:32)     
    at Module._load (internal/modules/cjs/loader.js:881:14)    
    at Function.Module._load (electron/js2c/asar.js:779:28)    
    at Module.require (internal/modules/cjs/loader.js:1023:19) 
    at require (internal/modules/cjs/helpers.js:77:18)
    at bindings (C:\Users\FelixDocuments\Code\Keynote\node_modules\bindings\bindings.js:112:48)
    at Object.<anonymous> (C:\Users\FelixDocuments\Code\Keynote\node_modules\drivelist\js\index.js:25:27)    
shmulka commented 3 years ago

Drivelist fails to recompile for Electron 10 /11 Windows - using Window build tools 2015. Using Window build tools 2017, recompile 'succeeds' but with warnings (MSB8029, MSB8012, C4996, C4309). Best solution moving forward would be to insulate from changes in the underlying JavaScript engine by migrating from NAN to N-API.

bennymeg commented 2 years ago

Maybe #392 PR will had solved this issue?

jfbvm commented 2 years ago

Any solution for this issue?

bennymeg commented 2 years ago

Well, I've done some digging inside etcher, it seems that the are running electron v12 whilst using etcher-sdk (which requires drivelist). So I guess that it is somehow possible to use newer electron with some webpack magic.