如何解决在Windows上运行npm install时出现fsevents警告的问题?

5
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,即使它不支持我的机器,会发生什么? 我该如何做?
要卸载fsevents,可以在终端中使用以下命令: npm uninstall fsevents
1个回答

4

fsevents不支持Windows机器。

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

我收到EBADPLATFORM错误,提示fsevents不支持的平台。

没关系,没有任何故障。 fsevents仅适用于macOS。其他平台被跳过。如果您想隐藏此警告,请向NPM bugtracker报告错误并要求默认隐藏ebadplatform警告。

/编辑:

为了解决您的问题:所有与fsevents相关的功能都将无法工作,但这也不会破坏您的代码,除非它纯粹依赖于fsevents。例如,webpack没有fsevents也可以正常工作,只需在npm run dev时重新启动即可实现热加载。


3
每次我运行 yarn install 命令时,它总是在终端中显示。另外,使用 yarn add <package> 命令也是如此。 - Han

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接