Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript stand

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

大概意思就是core.js的问题,试了一下在babel.config.js中添加:

presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]

运行之后报错如下:

 Error: Duplicate plugin/preset detected.
        If you'd like to use two separate instances of a plugin,
        they need separate names, e.g.

          plugins: [
            ['some-plugin', {}],
            ['some-plugin', {}, 'some unique name'],
          ]

        Duplicates detected are:
        [
          {
            "alias": "D:\\java\\SPACE\\code-space\\demodemo\\vue\\node_modules\\@vue\\cli-plugin-babel\\preset.js",
            "dirname": "D:\\java\\SPACE\\code-space\\demodemo\\vue",
            "ownPass": false,
            "file": {
              "request": "@vue/cli-plugin-babel/preset",
              "resolved": "D:\\java\\SPACE\\code-space\\demodemo\\vue\\node_modules\\@vue\\cli-plugin-babel\\preset.js"
            }
          },
          {
            "alias": "D:\\java\\SPACE\\code-space\\demodemo\\vue\\node_modules\\@vue\\babel-preset-app\\index.js",
            "dirname": "D:\\java\\SPACE\\code-space\\demodemo\\vue",
            "ownPass": false,
            "file": {
              "request": "@vue/app",
              "resolved": "D:\\java\\SPACE\\code-space\\demodemo\\vue\\node_modules\\@vue\\babel-preset-app\\index.js"
            }
          }
        ]

去掉刚刚添加在js文件的内容,启动成功了。
运行npm i element-ui -S 报错如下:

> core-js@2.6.12 postinstall D:\java\SPACE\code-space\demodemo\vue\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch
":"x64"})

第一步:在package.json中添加这个对象

"optionalDependencies": {
    "fsevents": "*"
  }

第二步:删除原来安装的包和生成的package-lock.json文件

第三步:重新执行安装命令

npm install --no-optional
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值