微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何解决 npm install 在 Windows 上抛出 fsevents 警告?

如何解决如何解决 npm install 在 Windows 上抛出 fsevents 警告?

info fsevents@2.3.1: The platform "win32" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and Failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and Failed compatibility check. Excluding it from installation.

如果我卸载 fsevents 会怎样?即使它不支持我的机器。 我该怎么做?

解决方法

Windows 机器不支持 fsevents。

见:https://www.npmjs.com/package/fsevents

我收到 EBADPLATFORM Unsupported platform for fsevents 错误。

没事,什么都没坏。 fsevents 仅适用于 macos。其他平台略过。如果您想隐藏此警告,请向 NPM bugtracker 报告错误,要求他们默认隐藏 ebadplatform 警告。

/编辑:

解决您的问题:所有有关 fsevents 的功能都将无法运行,但这也不会破坏您的代码,除非它完全依赖于 fsevents。例如,webpack 在没有 fsevents 的情况下仍然可以正常工作,您只需要重新启动它而不是在 npm run dev

时进行热加载

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。