Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install frida failed #79

Closed
prncoprs opened this issue Nov 19, 2022 · 3 comments
Closed

npm install frida failed #79

prncoprs opened this issue Nov 19, 2022 · 3 comments

Comments

@prncoprs
Copy link

Describe the bug
When I use npm to install frida, it failed.

To Reproduce
npm install frida

Error Outputs

➜  frida-node git:(main) ✗ npm install frida
npm ERR! code 1
npm ERR! path /Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/frida
npm ERR! command failed
npm ERR! command sh -c -- prebuild-install || node-gyp rebuild
npm ERR! prebuild-install warn install No prebuilt binaries found (target=19.1.0 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@19.1.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.8 found at "/opt/homebrew/opt/python@3.10/bin/python3.10"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/frida/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/admin/Library/Caches/node-gyp/19.1.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/admin/Library/Caches/node-gyp/19.1.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/admin/Library/Caches/node-gyp/19.1.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/frida',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: binding.gyp not found (cwd: /Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/frida) while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/node-gyp/lib/configure.js:284:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.1.0/bin/node" "/Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/admin/Projects/SDKPrivacyGuidance/tools/frida-node/node_modules/frida
npm ERR! gyp ERR! node -v v19.1.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2022-11-19T03_29_48_472Z-debug-0.log

Desktop (please complete the following information):

  • OS: Mac mini(m1, 2020), MacOS 12.1
  • nodejs: v19.1.0
  • npm: 8.19.3
@simkoc
Copy link

simkoc commented Nov 21, 2022

I cannot help fixing the bug but I have found a work around. The issue seems to be with the nodejs version. Using nvm to install nodejs@18.11.0 enabled me to install frida without a hitch.

@oleavr
Copy link
Member

oleavr commented Nov 24, 2022

This is fixed in Frida 16.0.3, released the other day. The issue was that we didn't provide prebuilds for Node.js v19.

@oleavr oleavr closed this as completed Nov 24, 2022
@liziwork
Copy link

How did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants