Skip to content

"Cannot read property 'type' of undefined" after upgrading to 4.14.0 #9767

@budarin

Description

@budarin

Got the error after upgrading to 4.14.0 on Flow type definitions

TypeError: Cannot read property 'type' of undefined

TypeError: Cannot read property 'type' of undefined
    at isForInRef (..\node_modules\eslint\lib\rules\no-unused-vars.js:410:24)
    at variable.references.some.ref (..\node_modules\eslint\lib\rules\no-unused-vars.js:447:21)
    at Array.some (<anonymous>)
    at isUsedVariable (..\node_modules\eslint\lib\rules\no-unused-vars.js:446:40)
    at collectUnusedVariables (..\node_modules\eslint\lib\rules\no-unused-vars.js:569:26)
    at collectUnusedVariables (..\node_modules\eslint\lib\rules\no-unused-vars.js:576:17)
    at Program:exit (..\node_modules\eslint\lib\rules\no-unused-vars.js:621:36)
    at listeners.(anonymous function).forEach.listener (..\node_modules\eslint\lib\util\safe-emitter.js:47:58)
    at Array.forEach (<anonymous>)
    at Object.emit (..\node_modules\eslint\lib\util\safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (..\node_modules\eslint\lib\util\node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (..\node_modules\eslint\lib\util\node-event-generator.js:280:22)
    at NodeEventGenerator.leaveNode (..\node_modules\eslint\lib\util\node-event-generator.js:303:14)
    at CodePathAnalyzer.leaveNode (..\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:630:23)
    at CodePathAnalyzer.overrideLeaveNode (..\node_modules\eslint-plugin-node\lib\rules\process-exit-as-throw.js:127:27)
    at Traverser.leave [as _leave] (..\node_modules\eslint\lib\linter.js:1000:32)
Process finished with exit code -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    archived due to ageThis issue has been archived; please open a new issue for any further discussionneeds infoNot enough information has been provided to triage this issuetriageAn ESLint team member will look at this issue soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions