vue-cli3 warning for core-js version

Created on 23 Mar 2019  ·  11Comments  ·  Source: vuejs/vue-cli

Version

3.5.1

Environment info

System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz
  Binaries:
    Node: 10.3.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.9.2 - C:\Users\schbrain\AppData\Roaming\npm\yarn.CMD
    npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.3
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.3
    @vue/babel-preset-app:  3.5.1
    @vue/babel-preset-jsx:  1.0.0-beta.3
    @vue/babel-sugar-functional-vue:  1.0.0-beta.3
    @vue/babel-sugar-inject-h:  1.0.0-beta.3
    @vue/babel-sugar-v-model:  1.0.0-beta.3
    @vue/babel-sugar-v-on:  1.0.0-beta.3
    @vue/cli-overlay:  3.5.1
    @vue/cli-plugin-babel: ^3.5.0 => 3.5.1
    @vue/cli-plugin-e2e-cypress: ^3.5.0 => 3.5.1
    @vue/cli-plugin-eslint: ^3.5.0 => 3.5.1
    @vue/cli-plugin-unit-mocha: ^3.5.0 => 3.5.1
    @vue/cli-service: ^3.5.0 => 3.5.1
    @vue/cli-shared-utils:  3.5.1
    @vue/component-compiler-utils:  2.6.0
    @vue/eslint-config-standard: ^4.0.0 => 4.0.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.2
    vue: ^2.6.6 => 2.6.10
    vue-eslint-parser:  2.0.3
    vue-hot-reload-api:  2.3.3
    vue-lazyload:  1.2.6
    vue-loader:  15.7.0
    vue-router: ^3.0.1 => 3.0.2
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.5.21 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

vue create a project
npm run serve

What is expected?

no warning

What is actually happening?

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 c orejs 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. I
f it doesn't, you need to run one of the following commands:

has PR babel

Most helpful comment

Fixed in 3.5.2

All 11 comments

Note: this does not affect actual usage because corejs: 2 is implicitly set and we do have a core-js dependency listed in @vue/babel-preset-app.

I've got this warning too.

The warning doesn't help at all and it creates panics.

I've got this warning too.

The warning doesn't help at all and it creates panics.

It sure does

no luck

still there

Bruce Chen notifications@github.com 于 2019年3月25日周一 23:17写道:

If you want to suppress this warning, just specify the corejs version in
your bable.config.js file like below.

presets: [['@vue/app', {
useBuiltIns: 'usage',
corejs: 2
}]]


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vue-cli/issues/3695#issuecomment-476490366, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQCpm0MhTqxBwTNEh53IbVphUfwxpyeKks5vabuGgaJpZM4cEr0M
.

Fixed in 3.5.2

@sodatea To be pedantic, I think it's really fixed in 3.5.3 since the babel downgrade is also necessary.

@412799755 Thank you very much!

I'm still struggling a bit with this. The latest version fixed my problems when building locally, but when I run the build commands in our Bitbucket Pipeline or in the Docker image thereof I get the following error:

npm run build

> [email protected] build /project-x
> vue-cli-service build


⠸  Building for production...

 ERROR  Failed to compile with 16 errors

These dependencies were not found:

* core-js/modules/es6.array.sort in ./src/store.js
* core-js/modules/es6.function.name in ./src/store.js, ./src/assets/global/api.js and 3 others
* core-js/modules/es6.number.constructor in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/utils/UploadUtil.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/utils/CategoryUtil.vue?vue&type=script&lang=js& and 1 other

I have tried to clear the npm cache and checked all versions of the packages. But so far no dice.

All help is much appreciated!

@dotmartin I was meeting the same problem before. I was using cnpm and it shows the same error.
I think it's related to symlink issue. Solve it by switching to yarn.

@dotmartin as a last resort, try to install core-js@2 as the project's dependency. I'm still thinking about how to fully resolve this issue.

@sodatea thanks, that seems to work just fine! Is there a ticket I can subscribe to for the final fix?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yyx990803 picture yyx990803  ·  34Comments

brunoseco picture brunoseco  ·  35Comments

AegirLeet picture AegirLeet  ·  38Comments

mayefeng picture mayefeng  ·  44Comments

yyx990803 picture yyx990803  ·  80Comments