当我尝试运行 npm install
时,它给了我这个错误:
$ 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 ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aroma\AppData\Roaming\npm-cache_logs\2018-03-
25T11_33_58_338Z-debug.log
节点版本:
$node -v
v8.10.0
我尝试了每一件事,比如:
npm cache clear
npm cache verify
npm i -g npm@latest
我什至尝试再次卸载并重新安装 Nodejs,但仍然出现相同的错误。
原文由 abeerShami 发布,翻译遵循 CC BY-SA 4.0 许可协议
我有同样的问题,删除我的“package-lock.json”并重新运行
npm install
有效