How to solve npm install throwing fsevents warning on non-MAC OS?

前端 未结 15 1792
眼角桃花
眼角桃花 2020-11-28 04:07

Following warning is being thrown on npm install command -

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\\rea
ct-         


        
相关标签:
15条回答
  • 2020-11-28 04:50

    If anyone get this error for ionic cordova install . just use this code npm install --no-optional in your cmd. And then run this code npm install -g ionic@latest cordova

    0 讨论(0)
  • 2020-11-28 04:53

    I got the same error. In my case, I was using a mapped drive to edit code off of a second computer, that computer was running linux. Not sure exactly why gulp-watch relies on operating system compatibility prior to install (I would assume it has to do with security purposes). Essentially the error is checking against your operating system and the operating system calling the node module, in my case the two operating systems were not the same so it threw it error. Which from the looks of your error is the same as mine.

    The Error

    Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    

    How I fixed it?

    I logged into the linux computer directly and ran

    npm install --save-dev <module-name>
    

    Then went back into my coding environment and everything was fine after that.

    Hope that helps!

    0 讨论(0)
  • 2020-11-28 04:54

    Do this:

    npm install --no-optional
    

    For more info on this go through: https://github.com/npm/npm/issues/11632

    0 讨论(0)
提交回复
热议问题