Error: spawn pod ENOENT when running `yarn run install-pods`

Error: spawn pod ENOENT when running `yarn run install-pods`

我正在尝试在我的机器上设置 React Native,当 运行 yarn run install-pods 我收到以下错误。

$ ./cli.js installPods
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn pod ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn pod',
  path: 'pod',
  spawnargs: [ 'install', '--project-directory=./hosts/native/ios' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
 musketeer % yarn run install-pods
yarn run v1.17.3
$ ./cli.js installPods
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn pod ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn pod',
  path: 'pod',
  spawnargs: [ 'install', '--project-directory=./hosts/native/ios' ]
}
error Command failed with exit code 1. 

尝试运行

npx react-native doctor

它会显示所有常见错误并尝试自动修复它们