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

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

    Instead of using --no-optional every single time, we can just add it to npm or yarn config.

    For Yarn, there is a default no-optional config, so we can just edit that:

    yarn config set ignore-optional true
    

    For npm, there is no default config set, so we can create one:

    npm config set ignore-optional true
    

提交回复
热议问题