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

node v19.8.1 install Error #87

Open
fairycn opened this issue Apr 6, 2023 · 7 comments
Open

node v19.8.1 install Error #87

fairycn opened this issue Apr 6, 2023 · 7 comments

Comments

@fairycn
Copy link

fairycn commented Apr 6, 2023

Version

  • python : 3.11.2
  • npm : 9.6.4
  • node : v19.8.1
    Error executing npm install frida
@bensh
Copy link

bensh commented Apr 14, 2023

Trouble installing 16.0.11 on 14.21.3 as well

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: prebuild-install || node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.

@bensh
Copy link

bensh commented Apr 17, 2023

Tried installing on 19.5.0 this morning and worked fine, not sure why,

@thistehneisen
Copy link

Having same problem with v20.0.0:

➜  ~ pip3 install --upgrade frida
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: frida in ./Library/Python/3.9/lib/python/site-packages (16.0.11)
Collecting frida
  Using cached frida-16.0.18-cp37-abi3-macosx_11_0_arm64.whl (29.4 MB)
Requirement already satisfied: typing-extensions in ./Library/Python/3.9/lib/python/site-packages (from frida) (4.5.0)
Installing collected packages: frida
  Attempting uninstall: frida
    Found existing installation: frida 16.0.11
    Uninstalling frida-16.0.11:
      Successfully uninstalled frida-16.0.11
Successfully installed frida-16.0.18
➜  ~ npm install -g igf
npm ERR! code 1
npm ERR! path /opt/homebrew/lib/node_modules/igf/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=20.0.0 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/opt/homebrew/opt/[email protected]/bin/python3.11"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/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   '/opt/homebrew/lib/node_modules/igf/node_modules/frida/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/npu/Library/Caches/node-gyp/20.0.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/npu/Library/Caches/node-gyp/20.0.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/npu/Library/Caches/node-gyp/20.0.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/opt/homebrew/lib/node_modules/igf/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: /opt/homebrew/lib/node_modules/igf/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 (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.4.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/20.0.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /opt/homebrew/lib/node_modules/igf/node_modules/frida
npm ERR! gyp ERR! node -v v20.0.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/npu/.npm/_logs/2023-04-26T04_46_51_698Z-debug-0.log
➜  ~ node -v
v20.0.0

@konsumer
Copy link

konsumer commented Jun 10, 2023

Same on mac ventura, node v20.0.0. I can downgrade to node 18.16.0 to get it to install.

@konsumer
Copy link

konsumer commented Jun 20, 2023

Seeing this, I thought maybe I could install from git. Seems like it finds bindings.gyp, but not frida-core.h.

../src/glib_context.h:4:10: fatal error: 'frida-core.h' file not found
#include <frida-core.h>
         ^~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/frida_binding/src/addon.o] Error 1

I followed the path of how to install it all from source:

git clone --recursive https://github.com/frida/frida.git
cd frida

make node-macos

FAILED: src/frida-helper
/Users/konsumer/Desktop/frida/frida-core/src/post-process-helper.sh src/frida-helper-raw ../../../frida-core/src/darwin/frida-helper.xcent src/frida-helper macos '>>>' /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Sx '<<<' true /usr/bin/codesign
error: The specified item could not be found in the keychain.
[2/2] Generating lib/agent/frida-agent with a custom command
FAILED: lib/agent/frida-agent.dylib
/Users/konsumer/Desktop/frida/frida-core/tools/post-process-module.sh macos '>>>' /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Sx '<<<' true /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool /usr/bin/codesign lib/agent/libfrida-agent-modulated.dylib lib/agent/frida-agent.dylib FridaAgent
error: The specified item could not be found in the keychain.
ninja: build stopped: subcommand failed.
make[1]: *** [build/tmp-macos-arm64/frida-core/.frida-helper-and-agent-stamp] Error 1
make: *** [node-macos] Error 2

This appears to need key stuff which seems to need gdb, which is not supported on M1:

brew install gdb

==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json

gdb: The x86_64 architecture is required for this software.
Error: gdb: An unsatisfied requirement failed this build.

Since it works fine on node 18.16.0, and installsfrida-tools fine, via pip, I think I am probably doing things wrong, here.

Update: I got my CA setup in "Keychain Access" and got it to build, without gdb. If I am understanding the original issue, I think maybe "Fix Node.js v19 compatibility" just needs to be published?

@konsumer
Copy link

konsumer commented Jun 20, 2023

I am a maintainer on node-raylib and we do prebuilds for different platform/arches in a Github action, and figure out if it needs to be built/downloaded in postinstall. For most people, it just downloads a small DLL at install-time, but for platforms we don't have builds for (M1 for example, since there isn't an easy way to build for mac-arm64 on Github actions) it downloads all deps (raylib) and runs build on the user's machine. Maybe a similar automation path would help here? I can help set it up, if there is interest.

@LaiKash
Copy link

LaiKash commented Nov 15, 2024

It's already Nov 2024, I believe that we should have prebuild binaries for recent nodejs versions :/

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

5 participants