0

I was using module "@nodert-win10-rs4/windows.devices.geolocation" in an electronjs app which was working fine. Later I installed a node module and rebuilt all the modules. Now it stopped working and throwing error. The previous version of that module ( "@nodert-win10-rs4/windows.devices.geolocation") was 1.0.0, Thus I reinstalled it, new version of the module is "0.3.2" but still error. Even i tried this in fresh new electron quick start app and I see the same error. I'm adding here the screenshot of the package.json and the error. (FYI - The module is installed and rebuilt without any error although it has some warning, I've added a screenshot of the installation/built too). Really appreciate any help/suggestions.

I saw other posts with similar errors but I already took the actions mentioned there.

Thanks Musa

N.B - Cross posted here

package.json app error rebuild log

Musa
  • 3,944
  • 4
  • 21
  • 27
  • Possible duplicate of [Electron Uncaught Error: A dynamic link library (DLL) initialization routine failed](https://stackoverflow.com/questions/36029955/electron-uncaught-error-a-dynamic-link-library-dll-initialization-routine-fai) – Redanium Nov 10 '18 at 01:36
  • Not really, I already taken all the actions stated there and mentioned in the post too. – Musa Nov 11 '18 at 23:12

1 Answers1

1

I ran into the same issue and here is how I resolved it.

  1. Copy the windows.devices.geolocation into your electron app folder and update the dependencies to point to the location of the folder. You need to this line added to your package.json of your Electron App

"windows.devices.geolocation": "file:windows.devices.geolocation"

  1. Navigate to the newly copied folder and build your NodeRT "addon" to match your Electron version. See this post here NodeRT with Electron

    node-gyp rebuild --target=4.0.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell

  2. Run npm install at the the top level Electron app.

Surya
  • 41
  • 3
  • This should work with Electron 5 `node-gyp rebuild --release --target=5.0.6 --arch=x64 --dist-url=https://electronjs.org/headers` – Surya Jul 06 '19 at 16:57
  • You need to replace all occurances of v8::Handle with v8::Local and the above command will work fine. See https://electronjs.org/blog/nodejs-native-addons-and-electron-5 – Surya Jul 08 '19 at 09:19