Skip to content

TypeError: Cannot read properties of undefined ('configs') when importing eslint-plugin-react-compiler #376

@sethamus

Description

@sethamus

Environment

jiti version: 2.4.2
eslint-plugin-react-compiler version:19.1.0-rc.1

Describe the bug

I've encountered a TypeError when trying to access the configs property of eslint-plugin-react-compiler when running a simple script with jiti. The same code works without issue when executed with Node.js.

Reproduction

  1. Create a file named index.ts.
  2. Populate index.ts with the following code:
import reactCompiler from "eslint-plugin-react-compiler"

console.log(reactCompiler.configs.recommended)
  1. Run the script using jiti:
npx jiti ./index.ts

Expected Behavior

The script should successfully import eslint-plugin-react-compiler and log the recommended configuration object to the console, similar to how it behaves when run with Node.js.

Actual Behavior

Running the script with jiti results in the following error:

TypeError: Cannot read properties of undefined (reading 'configs')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions