afc163 / fanyi

A 🇨🇳 and 🇺🇸 translator in your command line
https://npmjs.com/fanyi
MIT License
1.43k stars 135 forks source link

无法正常使用 #90

Closed coinlockerbaby closed 6 months ago

coinlockerbaby commented 1 year ago

⠋ node:events:489 throw er; // Unhandled 'error' event ^

Error: spawn festival ENOENT at ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on ChildProcess instance at: at ChildProcess._handle.onexit (node:internal/child_process:291:12) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -2, code: 'ENOENT', syscall: 'spawn festival', path: 'festival', spawnargs: [ '--pipe' ] }

Node.js v20.3.0

coinlockerbaby commented 1 year ago

系统为archlinux 通过npm包管理安装

xianghongai commented 1 year ago
xiang@xiang:~
$ fy hi

⠋ node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn festival ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485: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:291:12)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn festival',
  path: 'festival',
  spawnargs: [ '--pipe' ]
}
$ npm list -g
/home/xiang/.nvm/versions/node/v16.20.0/lib
├── corepack@0.17.0
├── fanyi@5.1.1
├── npm@8.19.4
└── yarn@1.22.19
lunrenyi commented 11 months ago

@coinlockerbaby @xianghongai 需要确保系统中安装了 festival,例如 sudo apt-get install festival

https://github.com/afc163/fanyi#error-spawn-festival-enoent