$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
audited 6890 packages in 2.854s
found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
原因
fsevents不在package.json里,但是仍然安裝了,是因為你的系統是Windows系統,fsevents是蘋果系統的可選依賴,你的項目有可能是團隊項目,別人在他的mac上安裝了fsevents相關依賴庫,
所以到這邊你也就安裝到你的windows上邊了。你可以檢查你的package.json 文件中是不是有fsevents相關依賴,刪除即好!
如果沒有,其他的npm包也會有依賴fsevents的!!!
這是warning錯誤,是因為mac下需要 fsevents,這里是在windows環境,所以可以忽略這個警告,對你沒什么影響的。
總結:
事實上這個代碼也不需要運行,本人親測之后安裝hexo的時候沒有必要運行這行代碼!