websockets / wscat

WebSocket cat
MIT License
2.25k stars 223 forks source link

[question] SyntaxError: Unexpected token '.' #155

Closed pprettysimpple closed 1 month ago

pprettysimpple commented 3 months ago

After fresh installation from the guide, I get this error:

$ wscat
/usr/local/lib/node_modules/wscat/node_modules/https-proxy-agent/dist/index.js:55
        this.proxyHeaders = opts?.headers ?? {};
                                 ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:85:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/wscat/bin/wscat:7:25)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

Looks like my installation is broken