vue踩坑之旅

欲哭无泪的踩了vue ui 的一个大坑

Vue UI:Vue开发者必不可少的工具 前往查看

切入正题

当我第一次使用 Vue UI 创建了一个项目 运行时出现一个warning,作为vue小白的我,对于warning error 有着十分谨慎的态度,虽然可以运行,但是对于报错必须消灭!!!(着实打脸)

运行npm run serve 时报错

具体报的内容大致如下

WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the `corejs` option.

You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:

  npm install --save core-js@2    npm install --save core-js@3
  yarn add core-js@2              yarn add core-js@3
  // 经过编译
  DONE  Compiled successfully in 10056ms      
               
  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.47.1:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

看到这大部分人(包括我)应该时去 npm/yarn

但是 安装完后再次运行发现
 ERROR  Failed to compile with 8 errors

These dependencies were not found:

* async-validator in ./node_modules/_element-ui@2.6.3@element-ui/lib/element-ui.common.js
* babel-helper-vue-jsx-merge-props in ./node_modules/_element-ui@2.6.3@element-ui/lib/element-ui.common.js
* normalize-wheel in ./node_modules/_element-ui@2.6.3@element-ui/lib/element-ui.common.js
* resize-observer-polyfill in ./node_modules/_element-ui@2.6.3@element-ui/lib/utils/resize-event.js
* throttle-debounce/debounce in ./node_modules/_element-ui@2.6.3@element-ui/lib/element-ui.common.js, ./node_modules/_element-ui@2.6.3@element-ui/
lib/tooltip.js and 1 other
* throttle-debounce/throttle in ./node_modules/_element-ui@2.6.3@element-ui/lib/element-ui.common.js

To install them, you can run: npm install --save async-validator babel-helper-vue-jsx-merge-props normalize-wheel resize-observer-polyfill throttl
e-debounce/debounce throttle-debounce/throttle

运行到这 着实慌了 决定删掉node-modules重新下载依赖

(友情提示:不要再编辑器中删除过大文件夹,容易卡死)

npm install

> vue-cli-service serve

 INFO  Starting development server...
 98% after emitting CopyPlugin

 DONE  Compiled successfully in 7272ms                                                                                                    13:46:59


  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.47.1:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.



成功了??? 没有Warning了 具体不清楚 发生了什么,

写篇文章挂在这,哪个大佬路过,帮我解决一下!!!

经过多方goolge

又回到最初的起点

当前解决方式

能运行,warning 还存在 (回到了最初, 后续有解决方式 再来修改文档)

各位大佬 如有解决方式请留言 谢谢!!!

欢迎来email Mr@fayu.163.com

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值