I am writing an electron app with electron-windows-notifications which is dependant on NodeRT.
As I try to install my project, I get following error for each of
Here is what I did to get the entire process to work for windows.devices.geolocation with Electron.
node-gyp rebuild --msvs_version=2017
%ProgramFiles(x86)%/Microsoft Visual Studio 14.0/VC/lib/store/references
Now the build should work without any issues. Run the test.js file from the output folder to make sure everything is working.
To use this node addon in Electron, it needs to be rebuilt to match the exact version of Electron you are using. (otherwise Electron app will freeze)
Copy the entire output folder into your Electron app folder. MyApp\windows.devices.geolocation\
etc. and modify the top level package.json file with this dependency as "windows.devices.geolocation": "file:windows.devices.geolocation"
Check your electron version using MyApp\node_modules/.bin/electron --version
for me it was 4.0.1
Run the following command to rebuild the NodeRT module to work in electron
node-gyp rebuild --target=4.0.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell
Now run the npm install
at the MyApp folder and your NodeRT is ready to go.