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

前端 未结 15 1996
眼角桃花
眼角桃花 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: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 
    

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

    Hope that helps!

提交回复
热议问题