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.

TypeError: Cannot read property 'value' of undefined

See original GitHub issue

What version of ESLint are you using? 2.10.0

What parser (default, Babel-ESLint, etc.) are you using? babel-eslint

Please show your full configuration:

{
  "parser": "babel-eslint",
  "extends": "airbnb",
  "env": {
    "browser": true,
    "mocha": true,
    "node": true
  },
  "rules": {
    "react/jsx-no-bind": 0,
    "react/prefer-stateless-function": 0,
    "comma-dangle": 0,
    "no-use-before-define": 0,
    "consistent-return": 0
  },
  "plugins": [
    "react"
  ]
}

What did you do? Please include the actual source code causing the issue. Just ran eslint on my project as normal

What did you expect to happen? No parser error

What actually happened? Please include the actual, raw output from ESLint. Get the following error: TypeError: Cannot read property ‘value’ of undefined

On linting this file:

module.exports = {
  'Home.Company': 'Comapny ABC'
};

Cannot read property ‘value’ of undefined TypeError: Cannot read property ‘value’ of undefined at isEnclosedInParens (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/rules/no-return-assign.js:23:21) at EventEmitter.AssignmentExpression (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/rules/no-return-assign.js:51:32) at emitOne (events.js:95:20) at EventEmitter.emit (events.js:182:7) at NodeEventGenerator.enterNode (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/util/node-event-generator.js:40:22) at CodePathAnalyzer.enterNode (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23) at CommentEventGenerator.enterNode (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/util/comment-event-generator.js:97:23) at Controller.traverser.traverse.enter (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/eslint.js:886:36) at Controller.__execute (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/estraverse/estraverse.js:397:31) at Controller.traverse (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/estraverse/estraverse.js:501:28)

This was working on 2.9.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
CodyReichertcommented, May 14, 2016
0reactions
gyandeepscommented, May 14, 2016

@meeber Plz log a separate issue for that rule. thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'value' of Undefined in JS
To solve the "Cannot read property 'value' of undefined" error, make sure that the DOM element you are accessing exists. The error is...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
Uncaught TypeError: Cannot read property 'value' of ...
I have some JavaScript code that gives this error. Uncaught TypeError: Cannot read property 'value' of undefined.
Read more >
Uncaught TypeError : Cannot read properties of undefined
The root cause of the error is that the declared variable doesn't have any value, so by default, JavaScript treats all variables as...
Read more >
[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
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