sebhildebrandt / osx-temperature-sensor

OSX temperature sensor
MIT License
19 stars 7 forks source link

Error when using with electron #9

Closed DJj123dj closed 2 years ago

DJj123dj commented 2 years ago

I get this error, I think it is because there haven't been updates to this package recently!

Uncaught Exception:Error: 
The module '/Users/idk/Desktop/tempmonitor/node_modules/osx-temperature-sensor/build/Release/smc.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 93. 
This version of Node.js requires NODE_MODULE_VERSION 103.

can you update your package please or something that this error doesn't happen again?

sebhildebrandt commented 2 years ago

@DJj123dj What platform are you using? This package is only intended to use on Mac OS

DJj123dj commented 2 years ago

I am on macOS monterey on an Intel MacBook pro from 2018

sebhildebrandt commented 2 years ago

@DJj123dj ok, my guess - reading from the error message ... it is about node versions:

When you get osx-temperature-sensor with rpm install ... this code is compiled with the current node version you have In place. If this is different that the one what is shipped with electron, you might get this error. So make sure that your local node version is the same as shipped with electron. At least this is my guess. You could switch node versions using the nvm package ... can you try this?

sebhildebrandt commented 2 years ago

@DJj123dj did you had time to check what I supposed?

DJj123dj commented 2 years ago

Yea i got it working, I just needed to recompile electron for the npm libraries

sebhildebrandt commented 2 years ago

@DJj123dj thank you … closing it …