sindresorhus / fkill-cli

Fabulously kill processes. Cross-platform.
MIT License
6.88k stars 159 forks source link

SyntaxError: Invalid regular expression #75

Closed mateuszjarzyna closed 4 years ago

mateuszjarzyna commented 4 years ago

I just installed the fkill and got an error SyntaxError: Invalid regular expression: /^[ \t]*(?<pid>\d+)[ \t]+(?<ppid>\d+)[ \t]+(?<uid>\d+)[ \t]+(?<cpu>\d+\.\d+)[ \t]+(?<memory>\d+\.\d+)[ \t]+/: Invalid group

MacOS Catalina 10.15.4 npm version 5.6.0, after updating to 6.14.8 got still same error shell (if important, I don't know) zsh 5.4.2 (x86_64-apple-darwin17.3.0)

❯ npm install --global fkill-cli
/usr/local/bin/fkill -> /usr/local/lib/node_modules/fkill-cli/cli.js
+ fkill-cli@6.0.1
added 143 packages in 17.179s

❯ fkill
/usr/local/lib/node_modules/fkill-cli/node_modules/fkill/node_modules/ps-list/index.js:80
const psOutputRegex = /^[ \t]*(?<pid>\d+)[ \t]+(?<ppid>\d+)[ \t]+(?<uid>\d+)[ \t]+(?<cpu>\d+\.\d+)[ \t]+(?<memory>\d+\.\d+)[ \t]+/;
                      ^

SyntaxError: Invalid regular expression: /^[ \t]*(?<pid>\d+)[ \t]+(?<ppid>\d+)[ \t]+(?<uid>\d+)[ \t]+(?<cpu>\d+\.\d+)[ \t]+(?<memory>\d+\.\d+)[ \t]+/: Invalid group
    at Object.<anonymous> (/usr/local/lib/node_modules/fkill-cli/node_modules/fkill/node_modules/ps-list/index.js:80:23)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Module.require (module.js:606:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/fkill-cli/node_modules/fkill/index.js:8:16)
    at Module._compile (module.js:662:30)

I'm not a JS developer, so have no idea how can I help in debugging the issue

sindresorhus commented 4 years ago

You need to update your Node.js version.