-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix babel useBuiltIns core-js warning #1471
Comments
I see this on the latest vue cli and vue js SPA build too.
|
how to fix this ques |
Got the same warning here when running |
well i already add core-js@3 but still has the same warning |
Try npm install --save core-js@2 probably your project core are not compatible with current core-js@3, but even if the same warning are keep, it will still work fine until you have a solution: 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 webpackbar 12:59:10 ✔ Client: Compiled successfully in 58.40s 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 webpackbar 12:59:20 ✔ Server: Compiled successfully in 9.66s |
core-js@3 is a big new release with tighter integration into babel, worth reading the blog post: https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md
|
Thanks @manigandham, that gave me the clue that I think the fix for this for nuxt is to allow https://github.com/nuxt/nuxt.js/tree/dev/packages/babel-preset-app to pass the |
Adding
|
Documentation for the |
worked perfectly! |
The issue is fix with the merge so i am closing the issue thank's for your comments all ! |
@sidwaseem 's solutions worked for me. Also worth noting that the core-js version is a string, not an integer. I banged my head against the wall too long wondering why I was still getting the error even though I added the version to my .bablrc file. |
Bug report
When running 'vanilla' build see the following warning in the console
Version
@vuepress/core@1.0.0-alpha.44
Steps to reproduce
$ mkdir test; cd test; npm init # accept defaults
$ npm install vuepress@next
$ echo '# Hello VuePress' > README.md
$ ./node_modules/.bin/vuepress build
What is expected?
no warnings about useBuiltIns
What is actually happening?
scary warning ;-)
actually, some additional information on how I stumbled across this. In my case adding nuxt@2.5.0 (used core-js 3) caused the "vupress build" to fail. Whereas adding nuxt@2.5.1 (uses core-js 2) makes the vuepress build error and warning go away. Related to nuxt/nuxt#5313
Other relevant information
The text was updated successfully, but these errors were encountered: