Module version mismatch, works on dev not on target environment


#1

I have the dreaded Module version mismatch Expected 48 got 47. I’ve followed the directions on using-native-node-modules with electron and have rebuilt the module in question (keytar) and can load it without issue, copying the directory with the application (including the node_modules) to another machine and dragging and dropping it into the electron quick start application works there as well.

But on every other machine following the same process of starting election quick start application and dropping folder into the application I get the module version mismatch error. The target hardware does not have npm or node installed.

I’m fairly new to npm but out of ideas on what to try since I have it working on my dev environment.

Any suggestions would be greatly appreciated.


#2

Are you sure those other machines have the same version of Electron as the one you’ve used to build the modules on your dev machine?


#3

Yeah, I downloaded the zip of the release from https://github.com/electron/electron/releases on the dev machine and the target machine to drag and drop the project directory into. Worked on one and not on the other.

Is there anything(libraries etc) outside of the project directory that may be being pulled in on that could create this kind of problem (visual studio, npm, node on the dev machine). This is just the getting started application + keytar.

I’ll double check again in the morning to make sure that the versions line up (because that would at least make sense)


#4

You are correct. I’m not sure how it happened, but the the version of electron quick start did not line up with the latest release of electron when i did my clone of the repository. Tried again today from scratch and all is working and making sense again.

Thanks again.