NPM警告可选跳过可选依赖性:fsevents@1.2.7



我正在尝试使用Angular CLI安装Angular,但是当我尝试运行此命令时,我会遇到错误。

命令

npm install -g @angular/cli

错误:

C:Usersabc>npm install -g @angular/cli
C:UsersabcAppDataRoamingnpmng -> C:UsersabcAppDataRoamingnpmnode_modules@angularclibinng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules@angularclinode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ @angular/cli@7.3.6
updated 1 package in 102.686s

节点版本v10.15.3

这是一个警告,而不是错误,这是因为您在Windows上。fsevents仅在Mac上工作,因此在Windows上不需要它,这就是为什么它是SKIPPING OPTIONAL DEPENDENCY

现在没有,现在没有办法摆脱它被打印到游戏机中,所以只要忽略它,因为它没有做任何事情,而是什么都没有做任何事情

这是因为您在Windows上运行。许多应用程序都使用该库,但仅在Mac上使用,因此它们在Windows和Linux上使用了其他内容。这就是为什么将其列为"可选"的原因。您可以忽略警告。

最新更新