AccessSniff icon indicating copy to clipboard operation
AccessSniff copied to clipboard

JavaScript Error when starting CLI command sniff

Open kantoche opened this issue 8 years ago • 2 comments

Hey,

See below the error (Windows 10, Node.js 5.10.0, npm 3.8.3)

$ sniff http://statamic.com/ -r json -l reports
C:\Users\Kantoche\AppData\Roaming\npm\node_modules\access-sniff\dist\app\index.js:37
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) {            throw new TypeError("Cannot call a class as a function"); } }
^
TypeError: Cannot call a class as a function
    at _classCallCheck (C:\Users\Kantoche\AppData\Roaming\npm\node_modules\access-sni           ff\dist\app\index.js:37:99)
    at Accessibility (C:\Users\Kantoche\AppData\Roaming\npm\node_modules\access-sniff           \dist\app\index.js:41:5)
    at Object._exports.setup (C:\Users\Kantoche\AppData\Roaming\npm\node_modules\acce           ss-sniff\dist\cli\index.js:46:21)
    at Object.<anonymous> (C:\Users\Kantoche\AppData\Roaming\npm\node_modules\access-           sniff\bin\accessSniff.js:3:24)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:146:18)
    at node.js:404:3

kantoche avatar Feb 22 '17 11:02 kantoche

I'm getting this error too. I think the server I'm running it on is an Ubuntu machine but I don't have much info about that. It's using the "node:latest" docker image in Gitlab CI, so the node version is probably the latest.

My output is slightly different:

TypeError: Cannot call a class as a function
    at _classCallCheck (/usr/local/lib/node_modules/access-sniff/dist/app/index.js:37:99)
    at Accessibility (/usr/local/lib/node_modules/access-sniff/dist/app/index.js:41:5)
    at Object._exports.setup (/usr/local/lib/node_modules/access-sniff/dist/cli/index.js:46:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/access-sniff/bin/accessSniff.js:3:24)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:148:9)
    at bootstrap_node.js:542:3

mistermashu avatar Mar 27 '17 20:03 mistermashu

oh, this appears to be a duplicate of https://github.com/yargalot/AccessSniff/issues/32. In there, yargalot said he'll be looking at it, so he knows about it at least :)

mistermashu avatar Mar 27 '17 20:03 mistermashu