alibaba / anyproxy

A fully configurable http/https proxy in NodeJS
http://anyproxy.io
Apache License 2.0
7.75k stars 1.21k forks source link

运行 anyproxy --intercept 时报错 throw er; // Unhandled 'error' even #602

Open Turbolento opened 2 years ago

Turbolento commented 2 years ago

Platform : Windows 11 Home 21H2 X64 AnyProxy Version: 4.1.3

运行 anyproxy --intercept 时报错,报错信息如下:

    C:\Users\admin>anyproxy --intercept
    node:events:504
          throw er; // Unhandled 'error' event
          ^

    Error: spawn powershell.exe ENOENT
        at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
        at onErrorNT (node:internal/child_process:478:16)
        at processTicksAndRejections (node:internal/process/task_queues:83:21)
    Emitted 'error' event on ChildProcess instance at:
        at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
        at onErrorNT (node:internal/child_process:478:16)
        at processTicksAndRejections (node:internal/process/task_queues:83:21) {
      errno: -4058,
      code: 'ENOENT',
      syscall: 'spawn powershell.exe',
      path: 'powershell.exe',
      spawnargs: [
        '-ExecutionPolicy',
        'Bypass',
        '-NoProfile',
        '-NoLogo',
        '-NoExit',
        '-InputFormat',
        'Text',
        '-Command',
        '-'
      ]
    }