Rob-- / memoryjs

Read and write process memory in Node.js (Windows API functions exposed via Node bindings)
MIT License
632 stars 86 forks source link

Usage with electron #107

Open Nimaear opened 1 year ago

Nimaear commented 1 year ago

When trying to use this together with electron, I am encountering the next error:

App threw an error during load
Error: Cannot find module './build/Release/memoryjs'

I tried the different solutions proposed in https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules, but noen of them seem to be working. I also tried to follow the build instructions for nw.js on https://github.com/Rob--/memoryjs/issues/23, but they also were of no help. Does anyone have a build environment working with the latest electron?

My electron version is:

    "@electron-forge/cli": "^6.0.5",
    "@electron-forge/maker-deb": "^6.0.5",
    "@electron-forge/maker-rpm": "^6.0.5",
    "@electron-forge/maker-squirrel": "^6.0.5",
    "@electron-forge/maker-zip": "^6.0.5",
    "@electron-forge/plugin-webpack": "^6.0.5",
tigohenryschultz commented 9 months ago

You have to compile it. Follow the instructions.

Rob-- commented 5 months ago

Does that directory exist? If not, run npm install from a terminal with a working directory of the memoryjs module (so form ./node_modules/memoryjs from your project's perspective). Or just run npm install memoryjs and look for the build error. If it can't find the directory it's likely failing to build. I've not tried building this project with Electron for at least a few years now so I'm not sure what the SOP is.