Getting error when installing Bugsnag 'Error: spawn npm ENOENT'

Getting error when installing Bugsnag 'Error: spawn npm ENOENT'

这是我 post 第一次来这里,如果我不遵守某些规则或格式不正确,我们深表歉意。 我正在使用 React Native 和 Expo 制作应用程序,当我尝试安装 bugsnag 时出现此错误。

$ npx bugsnag-expo-cli init
√ @bugsnag/expo does not appear to be installed, do you want to install it? ... yes
√ If you want the latest version of @bugsnag/expo hit enter, otherwise type the version you want ... latest
√ Using yarn or npm? » npm
> Installing @bugsnag/expo with npm. This could take a while!

  Error: spawn npm ENOENT
      at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
      at onErrorNT (internal/child_process.js:465:16)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)

您是否正在尝试 运行 Windows 上的 bugsnag-expo-cli? Expo CLI 目前仅支持 MacOS 和 Linux: https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration

作为 CLI 的替代方法,您可以遵循手动集成指南: https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/

如果您仍有问题,我建议您通过 support@bugsnag.com 联系我们,我们可以进行更详细的检查。