cyrus-and / chrome-har-capturer

Capture HAR files from a Chrome instance
MIT License
535 stars 90 forks source link

cli.js error #51

Closed gotch0 closed 7 years ago

gotch0 commented 7 years ago

Hi,

chrome-har-capturer doesn't seem to work on my fresh installed Ubuntu 16.04.3.

But launching it generate an error in "cli.js" that I can't figure it out...

gautier@gautier-Ubuntu:~$ chrome-har-capturer -o test.har "https://google.fr"
/usr/lib/node_modules/chrome-har-capturer/bin/cli.js:45
async function preHook(url, client) {
      ^^^^^^^^

SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)

Does someone know where am I wrong ? Did I miss something ?

Many thanks.

BR, Gautier

cyrus-and commented 7 years ago

See the README:

Important note: this is a complete rewrite that uses brand new JavaScript features and takes full advantage of the headless mode of Chrome; the upshot is that it requires Node.js version 7.6.0+ and can only work in headless mode. It also introduces breaking changes in the API. If these requirements are unfeasible stick with version 0.9.5 but consider that it will not be supported anymore.

gotch0 commented 7 years ago

Definitelly missed something... Works fine with 7.10.1 Thanks !