Skip to content

New error with v7.12.4: TypeError: Cannot read property 'type' of null #2137

Closed
@Android3000

Description

@Android3000

I'm seeing a new linting error failing a previously working module build via Webpack after the latest update to this plugin. The error I'm seeing is:

Module build failed: TypeError: Cannot read property 'type' of null
    at Object.getRelatedComponent"

A change was added where a new check to refId.parent.init.type !== 'Identifier' is being made, but it appears refId.parent.init must be null in some cases, and there isn't null check protection in place.

The commit in question is here:
5fc50aa#diff-bafb3355a409c4ba076a9e3d609ad65b

I can try to cobble together some files to try and reproduce this in some code if needed... I'll just have to put together a specific example to illustrate as I can't provide the existing code.

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