(chore) add allowScripts to package.json - #819
Open
raxod502 wants to merge 1 commit into
Open
Conversation
Unfortunately, NPM 12 adds a new feature, where it will silently skip
running post-install scripts, without telling you, unless you
explicitly configure it otherwise for every individual dependency.
As a result, if you checkout Objection onto a machine running NPM 12,
and run "npm install" in the agent directory, then it will error out
with:
Error: Could not locate the bindings file.
Which happens because the npm install runs the prepare script in the
agent package.json, which runs the build script, which invokes
frida-compile, which expects for its frida dependency to have been
actually installed properly.
Unfortunately, the npm install output makes absolutely no mention of
the fact that a post-install script was silently skipped. Even in the
debug logfile that it tells you about in the command output. I don't
know why this is the case. If you npm install frida just by itself,
then it does print a warning explaining the problem, but not if it's a
dependency.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Hi, I maintain https://aur.archlinux.org/packages/objection and encountered an error while packaging the new version of Objection, which turned out to be related to the new NPM version, not to any change in Objection.)
Unfortunately, NPM 12 adds a new feature, where it will silently skip running post-install scripts, without telling you, unless you explicitly configure it otherwise for every individual dependency.
As a result, if you checkout Objection onto a machine running NPM 12, and run "npm install" in the agent directory, then it will error out with:
Which happens because the npm install runs the prepare script in the agent package.json, which runs the build script, which invokes frida-compile, which expects for its frida dependency to have been actually installed properly.
Unfortunately, the npm install output makes absolutely no mention of the fact that a post-install script was silently skipped. Even in the debug logfile that it tells you about in the command output. I don't know why this is the case. If you npm install frida just by itself, then it does print a warning explaining the problem, but not if it's a dependency.