Skip to content

How do I decide which version of nodejs to use?

codecolorist edited this page Dec 17, 2021 · 2 revisions

I've got many bug reports complaining this:

install: prebuild-install || node-gyp rebuild

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Or

Error: The module 'frida_binding.node' was compiled against a different Node.js version using NODE_MODULE_VERSION XX. This version of Node.js requires NODE_MODULE_VERSION YYY. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

This is because that npm can't find any prebuilt binary package for you system. This project doesn't rely on too many npm packages, so the error is most likely to be related to frida-node package.

You need to find the right node version. To check which nodejs is supported, you can refer to these two pages:

  1. Locate a frida-node package that fits your operating system and CPU arch, for example, frida-v14.0.8-node-v83-linux-x64.tar.gz.
  2. Take a note for the node-v83 part. The number here is NODE_MODULE_VERSION. Then you can pick one of the node.js releases that matches this NODE_MODULE_VERSION. For example, Node.js 14.15.1 is using v83.