frida / frida-node

Frida Node.js bindings
282 stars 66 forks source link

#fixed docs: Node.js highest version support #59

Closed duraki closed 3 years ago

duraki commented 3 years ago

Due to complications in bindings.gyp, a lot of people have this issue with Node.js + frida-node implementation (just ask Google). Node.js defaulty to v15 as of 2020 so let users know the highest version supported.

duraki commented 3 years ago

ref: https://github.com/frida/frida-node/issues/42#issuecomment-496709766

oleavr commented 3 years ago

Thanks! ❤️ There isn't actually an upper limit – I've personally built frida-node with Node.js from git and that works fine. What's confusing people is that we only currently provide prebuilds for 10, 12, and 14. The plan is to switch to N-API at some point so we only need to ship one binary per OS/arch combination. It would also be nice to support building with a Frida devkit (from our releases page), so that the binding could be built straight from npm. Currently we require a fully built Frida source checkout, and pointing an environment variable named FRIDA at its path.

duraki commented 3 years ago

Always 😸 Ah, that actually makes sense. Hopefully we can make that switch happen. Otherwise, building an ENV can be option. For now, I hope this PR will make sense to other people figuring out the issue as it can be a long boring stuff. Thanks a lot for a detailed comment.

bigsur112 commented 3 years ago

Node.js highest version support, can not install by npm. npm ERR! code 1 npm ERR! path /Users/dse/Documents/frida/node_modules/frida npm ERR! command failed npm ERR! command sh -c prebuild-install || node-gyp rebuild npm ERR! prebuild-install WARN install read ECONNRESET npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@15.12.0 | darwin | x64 npm ERR! gyp info find Python using Python version 3.9.2 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3" npm ERR! gyp http GET https://nodejs.org/download/release/v15.12.0/node-v15.12.0-headers.tar.gz npm ERR! gyp WARN install got an error, rolling back install npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: read ECONNRESET npm ERR! gyp ERR! stack at TLSWrap.onStreamRead (node:internal/stream_base_commons:211:20) npm ERR! gyp ERR! System Darwin 20.3.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /frida npm ERR! gyp ERR! node -v v15.12.0 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

duraki commented 3 years ago

@bigsur112 open a new issue and don't spam PR board please

as you can see:

npm ERR! gyp http GET https://nodejs.org/download/release/v15.12.0/node-v15.12.0-headers.tar.gz

It installs node v15 but prebuilts are available for up to v12 (from readme)