您的位置:首页 > Web前端 > Vue.js

安装vue/cli的一些警告的解决方法

2019-04-25 20:01 906 查看

一.vue/cli

1.npm WARN vue-virtual-scroller@1.0.0-rc.2 requires a peer of vue@^2.5.21 but none is installed. You must install peer dependencies yourself.
解决方案:1).

npm install -g npm-install-peers

2).npm install -g npm
3).npm install -g vue^2.5.21
2.只要是以上格式的都像这样安装,安它提示的版本就行了,只用3)项就行了,不用重复1),2)
3.optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules@vue\cli\node_modules\fsevents):(此段为复制)
notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
解决:原因:
fsevents不在package.json里,但是仍然安装了,是因为你的系统是Windows系统,fsevents是苹果系统的可选依赖,你的项目有可能是团队项目,别人在他的mac上安装了fsevents相关依赖库,所以到这边你也就安装到你的windows上边了。你可以检查你的package.json 文件中是不是有fsevents相关依赖,删除即好!
如果没有,其他的npm包也会有依赖fsevents的!!!
这是warning错误,是因为mac下需要 fsevents,这里是在windows环境,所以可以忽略这个警告,对你没什么影响的。
5.更多关注:https://blog.csdn.net/weixin_44000275

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: