question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v4.14.0 scope analysis issue with babel-eslint

See original GitHub issue

For some reason, after update:

ERROR  Failed to compile with 1 errors                                                                                                    00:04:50
error  in ./pages/_document.js?entry

Module build failed: TypeError: Cannot read property 'type' of undefined
    at isForInRef (/Users/steida/dev/este/node_modules/eslint/lib/rules/no-unused-vars.js:410:24)
    at variable.references.some.ref (/Users/steida/dev/este/node_modules/eslint/lib/rules/no-unused-vars.js:447:21)
    at Array.some (<anonymous>)
    at isUsedVariable (/Users/steida/dev/este/node_modules/eslint/lib/rules/no-unused-vars.js:446:40)
    at collectUnusedVariables (/Users/steida/dev/este/node_modules/eslint/lib/rules/no-unused-vars.js:569:26)
    at Program:exit (/Users/steida/dev/este/node_modules/eslint/lib/rules/no-unused-vars.js:621:36)
    at listeners.(anonymous function).forEach.listener (/Users/steida/dev/este/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/steida/dev/este/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/Users/steida/dev/este/node_modules/eslint/lib/util/node-event-generator.js:251:26)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ndelangencommented, Dec 24, 2017

@not-an-aardvark I tried babel-eslint 8.1.0 and was still experiencing the issue.

I’ve downgraded to eslint 4.13.0 for now.

Opened a babel-eslint ticket here: https://github.com/babel/babel-eslint/issues/558

1reaction
mikeconwellcommented, Jan 3, 2018

@not-an-aardvark I’ll put the work on that team to update dependencies citing this task. May come back later. Thanks for quick response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatibility with eslint 4.14.0 · Issue #558 - GitHub
Actually, it seems like the monkeypatched escope.analyze will never be called by parse-with-scope , because parse-with-scope creates a ...
Read more >
ESLint - Error: Must use import to load ES Module
I think the problem is that you are trying to use the deprecated babel-eslint parser, last updated a year ago, which looks like...
Read more >
Working with Custom Parsers - Pluggable JavaScript Linter
Custom parsers can use customized scope analysis for experimental/enhancement syntaxes. Default is the ScopeManager object which is created by eslint-scope.
Read more >
@babel/eslint-parser - npm
ESLint parser that allows for linting of experimental syntax transformed by Babel. Latest version: 7.19.1, last published: 3 months ago.
Read more >
babel/parser
The Babel parser (previously Babylon) is a JavaScript parser used in Babel. The latest ECMAScript version enabled by default (ES2020). Comment attachment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found