当我运行 npm install 时,我收到此错误:
npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for
fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"}) npm ERR! notsup Valid OS: darwin npm
ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: win32 npm
ERR! notsup Actual Arch: x64
此处已提出 此 问题,但已接受的可选答案对我不起作用,因为由于 npm install 失败,我无法发布到 azure。
npm 版本: 5.6.0
我努力了:
npm install --no-optional
原文由 Curious-programmer 发布,翻译遵循 CC BY-SA 4.0 许可协议
npm i -f 听起来不是个好主意……
相反,将 fsevents 添加到可选依赖项(如果 fsevents 在您的 package.json 中):