npm警告可选的跳过选择性依赖:fsevents@1.2.7 [英] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7

查看:38
本文介绍了npm警告可选的跳过选择性依赖:fsevents@1.2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to install Angular using the Angular CLI but I'm getting an error when I try to run this command.

命令

npm install -g @angular/cli

错误:

C:\Users\abc>npm install -g @angular/cli
C:\Users\abc\AppData\Roaming\npm\ng -> C:\Users\abc\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\@angular\cli\node_modules\fsevents):
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 .

This is a warning not an error, and it's because you're on Windows. FSevents only works on Mac so it's not needed on Windows and that's why it's SKIPPING OPTIONAL DEPENDENCY.

现在还没有办法消除被打印到控制台中的问题,因此鉴于它实际上并没有执行任何操作,而是只是有点冗长,告诉您它没有被执行,因此只需忽略它即可.使用.

And no as of right now there is no way to get rid of that being printed into the console so just ignore it given the fact that it's not doing anything anyways rather it's just being a bit verbose and telling you that it's not being used.

这篇关于npm警告可选的跳过选择性依赖:fsevents@1.2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆