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 · 6 comments
Open

node v19.8.1 install Error #87

fairycn opened this issue Apr 6, 2023 · 6 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,

@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.

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
@konsumer @bensh @fairycn and others