Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-cli3 warning for core-js version #3695

Closed
412799755 opened this issue Mar 23, 2019 · 11 comments · Fixed by #3696
Closed

vue-cli3 warning for core-js version #3695

412799755 opened this issue Mar 23, 2019 · 11 comments · Fixed by #3696

Comments

@412799755
Copy link

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:

@haoqunjiang
Copy link
Member

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.

@medmin
Copy link

medmin commented Mar 26, 2019

I've got this warning too.

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

@DMXL
Copy link

DMXL commented Mar 26, 2019

I've got this warning too.

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

It sure does

@medmin
Copy link

medmin commented Mar 26, 2019 via email

@haoqunjiang
Copy link
Member

Fixed in 3.5.2

@Anaphase
Copy link

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

@cytyikai
Copy link

@412799755 Thank you very much!

@dotmartin
Copy link

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

> project-x@1.1.4 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!

@bruceCzK
Copy link

@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.

@haoqunjiang
Copy link
Member

@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.

@dotmartin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants