npm安装错误(代码EBADPLATFORM) [英] npm install error (code EBADPLATFORM)

查看:1994
本文介绍了npm安装错误(代码EBADPLATFORM)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行 npm install 时,它给了我这个错误:

When I tried to run npm install, it gave me this error:

$ 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 

我尝试了所有方法,例如:

I tried every thing, like:

npm cache clear 
npm cache verify
npm i -g npm@latest

我什至再次尝试卸载并重新安装 Nodejs,但仍然出现相同的错误.

I even tried uninstalling and reinstalling Nodejs again but still get the same error.

推荐答案

错误表明您正在其他操作系统而不是 Mac 上安装 fsevents 模块

Error is indicating that you are installing fsevents module in other OS rather than Mac

fsevents 模块仅适用于 Mac 操作系统

fsevents module only works for Mac Operting system

这篇关于npm安装错误(代码EBADPLATFORM)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆