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

Error while initializing babel in docz #1739

@kxnkxv

Description

@kxnkxv

Error while initializing babel in docz: Error: Configuration contains string/RegExp pattern, but no filename was passed to Babel

  1. yarn add docz # react react-dom in existing project
  2. run docz:dev

Output:

Error while initializing babel in docz:  Error: Configuration contains string/RegExp pattern, but no filename was passed to Babel
    at matchPattern (/Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:556:11)
    at /Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:543:35
    at Array.some (<anonymous>)
    at matchesPatterns (/Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:543:19)
    at configFieldIsApplicable (/Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:501:10)
    at configIsApplicable (/Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:496:233)
    at /Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:316:9
    at Generator.next (<anonymous>)
    at loadFileChain (/Users/kxnkxv/Desktop/frontend/node_modules/react-docgen/node_modules/@babel/core/lib/config/config-chain.js:232:24)
    at loadFileChain.next (<anonymous>)
/Users/kxnkxv/Desktop/frontend/node_modules/docz-core/dist/index.js:1605
  throw new Error(e); // babylon = require('react-docgen/dist/babylon').default
  ^

Error: Error: Configuration contains string/RegExp pattern, but no filename was passed to Babel
    at Object.<anonymous> (/Users/kxnkxv/Desktop/frontend/node_modules/docz-core/dist/index.js:1605:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/kxnkxv/Desktop/frontend/node_modules/docz/bin/index.js:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions