4

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

Command

npm install -g @angular/cli

Error:

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

Node Version v10.15.3

Daniel Turcich
  • 1,764
  • 2
  • 26
  • 48
Muhammad Rashid
  • 219
  • 1
  • 6
  • 19

2 Answers2

8

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.

Daniel Turcich
  • 1,764
  • 2
  • 26
  • 48
2

This is because you're running on windows. A lot of apps use that library, but it only works on the Mac, so they use something else for Windows and Linux. That's why it's listed as "optional". You can ignore the warning.

A. L. Flanagan
  • 1,162
  • 8
  • 22