【问题标题】:Unsupported platform for inotify@1.4.6 on Mac while npm installnpm install 时 Mac 上的 inotify@1.4.6 平台不受支持
【发布时间】:2021-07-09 18:24:13
【问题描述】:

我正在尝试建立一个反应项目。但是,当我运行 npm install 时,它会抛出这个错误:

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for inotify@1.4.6: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS:    linux
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   darwin
npm ERR! notsup Actual Arch: x64 

显然,我的 mac 似乎不支持这个库。我希望一些解决方法可以解决这个问题,而不是删除这个库。 请建议我如何解决此问题。

【问题讨论】:

  • 为 MacOS 寻找另一个库
  • @KetZoomer 实际上这是其他库的依赖项之一。想不出任何其他选择
  • 您是否检查过您没有不小心尝试安装dev 软件包?见stackoverflow.com/questions/41816384/…
  • @adamgy。我也试过了。但它没有用。
  • @Archit 您是否偶然找到了解决方案?我在 macOS 和我通过 Parallels 安装的 Windows 10 VM 上都收到此错误...

标签: reactjs macos npm node-modules


【解决方案1】:

从这里窃取答案:https://stackoverflow.com/a/59159117/10431460

只需运行此程序即可为我解决问题:

npm uninstall dev --save

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-17
    • 1970-01-01
    • 2017-06-08
    • 1970-01-01
    • 2018-08-23
    • 1970-01-01
    • 2018-04-04
    • 2017-01-12
    相关资源
    最近更新 更多