I am not sure is this an Error, and how to fix it.
the console out :
[email protected] prepare /Users/apple/Documents/3rdPart/frida-agent-example
npm run build
[email protected] build /Users/apple/Documents/3rdPart/frida-agent-example
frida-compile agent/index.ts -o _agent.js
/Users/apple/Documents/3rdPart/frida-agent-example/node_modules/chokidar/index.js:904
const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/Users/apple/Documents/3rdPart/frida-agent-example/node_modules/frida-compile/index.js:3:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: frida-compile agent/index.ts -o _agent.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2020-05-22T03_16_59_979Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepare: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
╭─────────────────────────────────────╮
│ │
│ Update available 5.0.1 → 5.6.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2020-05-22T03_17_00_063Z-debug.log
=====2020-05-22T03_17_00_063Z-debug.log par of content========
11246 silly lifecycle [email protected]postinstall: no script for postinstall, continuing
11247 silly prepublish [email protected]
11248 info lifecycle [email protected]prepublish: [email protected]
11249 silly lifecycle [email protected]prepublish: no script for prepublish, continuing
11250 info lifecycle [email protected]prepare: [email protected]
11251 verbose lifecycle [email protected]prepare: unsafe-perm in lifecycle true
11252 verbose lifecycle [email protected]prepare: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/apple/Documents/3rdPart/frida-agent-example/node_modules/.bin:/Users/apple/.pyenv/shims:/Users/apple/Documents/3rdPart/cocos2d-x-3/tools/cocos2d-console/bin:/Users/apple/Documents/3rdPart/theos:/Users/apple/bin/:/opt/iOSOpenDev/bin:/opt/local/bin:/opt/local/sbin:/Applications/Android Studio.app/Contents/gradle/gradle-4.4/bin:/usr/local/Cellar/cmake/3.5.1/bin:/usr/local/Cellar/qt5/5.6.0/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/apple/Documents/3rdPart/flutter/bin:/Users/apple/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2/bin:/Users/apple/developer/AndroidSDK/build-tools/29.0.2:/Users/apple/Library/Python/3.7/bin:/Users/apple/.rvm/gems/ruby-2.4.0/bin:/Users/apple/.rvm/gems/ruby-2.4.0@global/bin:/Users/apple/.rvm/rubies/ruby-2.4.0/bin:/Users/apple/.pyenv/shims:/Users/apple/Documents/3rdPart/cocos2d-x-3/tools/cocos2d-console/bin:/Users/apple/Documents/3rdPart/theos:/Users/apple/bin/:/opt/iOSOpenDev/bin:/opt/local/bin:/opt/local/sbin:/Applications/Android Studio.app/Contents/gradle/gradle-4.4/bin:/usr/local/Cellar/cmake/3.5.1/bin:/usr/local/Cellar/qt5/5.6.0/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/apple/Documents/3rdPart/flutter/bin:/Users/apple/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2/bin:/Users/apple/developer/AndroidSDK/build-tools/29.0.2:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Applications/Wireshark.app/Contents/MacOS:/Users/apple/.rvm/bin
11253 verbose lifecycle [email protected]prepare: CWD: /Users/apple/Documents/3rdPart/frida-agent-example
11254 silly lifecycle [email protected]prepare: Args: [ '-c', 'npm run build' ]
11255 silly lifecycle [email protected]prepare: Returned: code: 1 signal: null
11256 info lifecycle [email protected]prepare: Failed to exec prepare script
11257 verbose stack Error: [email protected] prepare: npm run build
11257 verbose stack Exit status 1
11257 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
11257 verbose stack at emitTwo (events.js:125:13)
11257 verbose stack at EventEmitter.emit (events.js:213:7)
11257 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
11257 verbose stack at emitTwo (events.js:125:13)
11257 verbose stack at ChildProcess.emit (events.js:213:7)
11257 verbose stack at maybeClose (internal/child_process.js:887:16)
11257 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
11258 verbose pkgid [email protected]
11259 verbose cwd /Users/apple/Documents/3rdPart/frida-agent-example
11260 verbose Darwin 18.5.0
11261 verbose argv "/usr/local/Cellar/node/8.0.0_1/bin/node" "/usr/local/bin/npm" "install"
11262 verbose node v8.0.0
11263 verbose npm v5.0.1
11264 error code ELIFECYCLE
11265 error errno 1
11266 error [email protected] prepare: npm run build
11266 error Exit status 1
11267 error Failed at the [email protected] prepare script.
11267 error This is probably not a problem with npm. There is likely additional logging output above.
11268 verbose exit [ 1, true ]