frida/frida-node

Electron NODE_MODULE_VERSION mismatch

FuzzySecurity opened this issue · 2 comments

I tried to incorporate Frida into electron, I am using npm for installation:

C:\.........\frida-test>npm view electron version
5.0.1

C:\.........\frida-test>npm view frida version
12.5.6

But on launch I am getting a NODE_MODULE_VERSION mismatch.

......\node_modules\frida\build\Release\frida_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 70.

Looking at the Frida releases I see electron v70 should supported right?
https://github.com/frida/frida/releases

Am I missing something here (I am a bit new to node still..).

Yes, wipe node_modules and re-install it like this: npm_config_runtime=electron npm_config_target=5.0.0 npm install

@oleavr thanks for your reply, I'm afraid that deosn't resolve the issue

C:\..........\frida-test>set npm_config_runtime=electron

C:\..........\frida-test>set npm_config_target=5.0.0

C:\..........\frida-test>npm install

> frida@12.5.6 install C:\.....\node_modules\frida
> prebuild-install || node-gyp rebuild


> electron@5.0.1 postinstall C:\.....\frida-test\node_modules\electron
> node install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN frida-test@1.0.0 No description
npm WARN frida-test@1.0.0 No repository field.

added 199 packages from 164 contributors and audited 316 packages in 13.077s
found 0 vulnerabilities

Now when starting the app there is a different version but still a missmatch.

.....\node_modules\frida\build\Release\frida_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 47. This version of Node.js requires
NODE_MODULE_VERSION 70.

For debugging I also manually crabbed the pre-compiled package from releases and it also shows 47 as the version. I opened a separate ticket to track this.