Skip to content

TypeError: Cannot read property 'name' of null #2728

Closed
@sluukkonen

Description

@sluukkonen

Version 7.20.4 seems to crash with the following error in a non-tsx file.

yarn run v1.22.4
$ prettier packages/core/src/**/*.less --check && eslint packages --ext .js,.ts,.tsx --cache
Checking formatting...
All matched files use Prettier code style!

Oops! Something went wrong! :(

ESLint: 7.5.0

TypeError: Cannot read property 'name' of null
Occurred while linting /home/runner/work/exam-engine/exam-engine/packages/cli/src/commands/create-mex.ts:23
    at Object.getStatelessComponent (/home/runner/work/exam-engine/exam-engine/node_modules/eslint-plugin-react/lib/util/Components.js:692:45)
    at Object.getParentStatelessComponent (/home/runner/work/exam-engine/exam-engine/node_modules/eslint-plugin-react/lib/util/Components.js:728:42)
    at Object.getParentComponent (/home/runner/work/exam-engine/exam-engine/node_modules/eslint-plugin-react/lib/util/Components.js:623:18)
    at Object.ArrowFunctionExpression (/home/runner/work/exam-engine/exam-engine/node_modules/eslint-plugin-react/lib/util/Components.js:916:31)
    at updatedRuleInstructions.<computed> (/home/runner/work/exam-engine/exam-engine/node_modules/eslint-plugin-react/lib/util/Components.js:970:43)
    at /home/runner/work/exam-engine/exam-engine/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/runner/work/exam-engine/exam-engine/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/runner/work/exam-engine/exam-engine/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
    at NodeEventGenerator.applySelectors (/home/runner/work/exam-engine/exam-engine/node_modules/eslint/lib/linter/node-event-generator.js:283:22)

I haven't been able to produce a reduced test case yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions