Running with native models


When I use electron-rebuild this allows me to use native modules within my electron application. However when I then run normal node (without electron), I can no longer use some of the native modules that were rebuilt.

What is the best setup to avoid this?

I just want to create a library, that relies on node-serialport, and run it from node or electron without node or electron complaining about the wrong version being used.