gatsby: "WARNING: We noticed you're using the `useBuiltIns`" and gatsby-node failure when Gatsby 2.1.4 -> 2.1.20

I’m getting this warning

⠄ source and transform nodes
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

that drives to what seems a non execution of gatsby-node.js that then kills my site. But I only have it when I update the dependencies.

Find below the package.json that works. If I then upgrade gatsby to version 2.3.5 it gives the warning (and later on error). It seems the same as #12744 (but that one is fixed) ?

package.json that works
child child theme
    "gatsby": "2.1.4",
    "react": "16.8.4",
    "react-dom": "16.8.4",

    "path": "0.12.7",

    "gatsby-plugin-page-creator": "2.0.10",

    "(child theme)"

child theme
    "styled-components": "4.1.3",
    "babel-plugin-styled-components": "1.10.0",
    "gatsby-plugin-styled-components": "3.0.6",
    "path": "0.12.7",
    "esm": "3.2.14",
    "prop-types": "15.7.2",

    "gatsby-plugin-page-creator": "2.0.10",
    "gatsby-source-filesystem": "2.0.23",
    "gatsby-plugin-gtag": "1.0.10",
    "gatsby-plugin-manifest": "2.0.22",
    "gatsby-plugin-compile-es6-packages": "1.0.6",

    "react-cookie-consent": "2.2.2",
    "styled-icons": "7.4.2"

    "(core-theme)"

core theme
    "styled-components": "4.1.3",
    "babel-plugin-styled-components": "1.10.0",
    "gatsby-plugin-styled-components": "3.0.6",
    "path": "0.12.7",
    "esm": "3.2.14",
    "prop-types": "15.7.2",

    "gatsby-plugin-page-creator": "2.0.10",
    "gatsby-source-filesystem": "2.0.23",
    "gatsby-plugin-compile-es6-packages": "1.0.6",

    "styled-icons": "7.4.2",

    "gatsby-image": "2.0.31",
    "gatsby-mdx": "0.4.2",
    "@mdx-js/mdx": "0.20.3",
    "@mdx-js/tag": "0.20.3",
    "gatsby-plugin-offline": "2.0.24",
    "gatsby-plugin-react-helmet": "3.0.8",
    "gatsby-plugin-sharp": "2.0.25",
    "gatsby-transformer-sharp": "2.1.15",
    "react-helmet": "5.2.0",
    "react-share": "2.4.0"

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (7 by maintainers)

Most upvoted comments

I ended up fixing this with the help of install-peerdeps:

$ yarn add gatsby-mdx@next
$ install-peerdeps gatsby-mdx@next

Note that @mdx-js/tag has been replaced by @mdx-js/react, so you’ll have to change any imports for that too.

I checked and it seems like gatsby-mdx did fix this in gatsby-mdx@0.5.5 ( https://github.com/ChristopherBiscardi/gatsby-mdx/commit/78b5893f0ff42a9d8a0e01bb68411ae892ccbb0f#diff-8de08d558f657ab05545b5023ac10283 ) - can you try using that (or later)