Fix warnings about undeclared corejs version
mtlynch opened this issue · 4 comments
mtlynch commented
The npm run build
command currently generates this warning about core-js:
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
I tried installing core-js to my package.json but it's already installed.
I found this solution which says to add settings to my .babelrc
, and I tried adding them to my babel.config.js
but I just ended up with this error:
Module build failed (from ./node_modules/babel-loader/lib/index.js): ReferenceError: [BABEL] /samba/whatgotdone/frontend/src/main.js: Unknown option: .useBuiltIns. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
mtlynch commented
This issue is still open if anyone from #hacktoberfest
wants to take a look.
smartrack commented
@mtlynch I tried npm run build
in my local. I don't see this warning message
well I see different warning message. Can we close this issue?
mtlynch commented
Yeah, looks like it's no longer happening. Thanks!