首页 > 解决方案 > 安装 Bugsnag 时出现错误“错误:spawn npm ENOENT”

问题描述

这是我第一次在这里发帖,如果我不遵守某些规则或格式不正确,请大家见谅。我正在使用 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)

标签: npmexpobugsnag

解决方案


您是否尝试bugsnag-expo-cli在 Windows 上运行?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 与我们联系,我们可以进行更详细的查看。


推荐阅读