You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to set up Cloudsploit scanner in Azure VM, am presented with this error on run:
azureuser@cloudsploit-master:~/scans$ ./index.js -h
/home/azureuser/scans/node_modules/argparse/argparse.js:222
} catch {}
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/azureuser/scans/index.js:3:28)
The block of code in question:
function _alias(object, from, to) {
try {
let name = object.constructor.name
Object.defineProperty(object, from, {
value: util.deprecate(object[to], sub('%s.%s() is renamed to %s.%s()',
name, from, name, to)),
enumerable: false
})
} catch {}
}
I am not a developer, but it seems to me that the "catch" is missing the variable to catch. On this assumption, I changed the catch to
} catch (exp) {}
}
And was then able to view the usage information as expected.
While trying to set up Cloudsploit scanner in Azure VM, am presented with this error on run:
The block of code in question:
I am not a developer, but it seems to me that the "catch" is missing the variable to catch. On this assumption, I changed the catch to
And was then able to view the usage information as expected.
OS: Ubuntu 18.04
Node version: v8.10.0
NPM version: 3.5.2
The text was updated successfully, but these errors were encountered: