Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Docz build failing for --> @babel/preset-env [exclude] option #1693

Open
@malhar12

Description

@malhar12

Environment for reproduction:

Docz version: 2.3.1
Node version: 14.16.0
babel-preset-gatsby@0.12.3
gatsby-cli@2.19.3
gatsby-graphiql-explorer@0.11.0
gatsby-link@2.11.0
gatsby-page-utils@0.9.1
gatsby-plugin-alias-imports@1.0.5
gatsby-plugin-compile-es6-packages@2.1.1
gatsby-plugin-emotion@4.5.0
gatsby-plugin-eslint@2.0.8
gatsby-plugin-mdx@1.10.1
gatsby-plugin-page-creator@2.10.2
gatsby-plugin-react-helmet-async@1.2.0
gatsby-plugin-root-import@2.0.8
gatsby-plugin-typescript@2.12.1
gatsby-plugin-utils@0.9.0
gatsby-react-router-scroll@3.7.0
gatsby-recipes@0.9.3
gatsby-source-filesystem@2.11.1
gatsby-theme-docz@2.3.1

Command that I'm executing --> yarn docz build --typescript

failed Building production JavaScript and CSS bundles - 4.581s

ERROR #98123  WEBPACK
Generating JavaScript bundles failed
[BABEL] /app/.docz/.cache/polyfill-entry.js: @babel/preset-env: The
plugins/built-ins 'es.error.to-string, es.number.to-exponential' passed to the
'exclude' option are not valid. Please check data/[plugin-features|built-in-features].js in
babel-preset-env (While processing:
"/app/node_modules/@babel/preset-env/lib/index.js")
File: .cache/polyfill-entry.js

ERROR #98123  WEBPACK
Generating JavaScript bundles failed
[BABEL] /app/.docz/.cache/production-app.js: @babel/preset-env: The
plugins/built-ins 'es.error.to-string, es.number.to-exponential' passed to the
'exclude' option are not valid. Please check data/[plugin-features|built-in-features].js in
babel-preset-env (While processing:
"/app/node_modules/@babel/preset-env/lib/index.js")
File: .cache/production-app.js

Not sure, as to what the error is. It says that the plugins/built-ins that are passed to the exclude option are not valid. Tried to override it by passing empty array to it inside gatsby-node.js :

exports.onCreateBableConfig = ({actions}) => {

  actions.setBabelPreset({
    name: "@babel/preset-env",
    options: {
      exclude: []
    }
  });
}

A help here would be much appreciated, as all my builds are failing because it is failing to deploy the documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions