安装 Bugsnag 时出现错误“错误:spawn npm ENOENT”

MAR*_*NCE 3 npm bugsnag expo

这是我第一次在这里发帖,如果我不遵循一些规则或格式不正确,我深表歉意。\n我正在使用 React Native 和 Expo 制作一个应用程序,当我尝试安装 bugsnag 时,我收到此错误。

\n
$ npx bugsnag-expo-cli init\n\xe2\x88\x9a @bugsnag/expo does not appear to be installed, do you want to install it? ... yes\n\xe2\x88\x9a If you want the latest version of @bugsnag/expo hit enter, otherwise type the version you want ... latest\n\xe2\x88\x9a Using yarn or npm? \xc2\xbb npm\n> Installing @bugsnag/expo with npm. This could take a while!\n\n  Error: spawn npm ENOENT\n      at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n      at onErrorNT (internal/child_process.js:465:16)\n      at processTicksAndRejections (internal/process/task_queues.js:80:21)\n
Run Code Online (Sandbox Code Playgroud)\n

小智 6

您是否尝试在 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/