Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot read property 'type' of null #784

Closed
dustinmoorenet opened this issue Aug 24, 2016 · 2 comments
Closed

Error: Cannot read property 'type' of null #784

dustinmoorenet opened this issue Aug 24, 2016 · 2 comments
Labels

Comments

@dustinmoorenet
Copy link

Error: Cannot read property 'type' of null
TypeError: Cannot read property 'type' of null
    at hasRenderMethod (<project_src>/node_modules/eslint-plugin-react/lib/rules/require-render-return.js:79:62)
    at EventEmitter.Program:exit (<project_src>/node_modules/eslint-plugin-react/lib/rules/require-render-return.js:115:14)
    at emitOne (events.js:95:20)
    at EventEmitter.emit (events.js:182:7)
    at NodeEventGenerator.leaveNode (<project_src>/node_modules/eslint/lib/util/node-event-generator.js:49:22)
    at CodePathAnalyzer.leaveNode (<project_src>/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:628:23)
    at CommentEventGenerator.leaveNode (<project_src>/node_modules/eslint/lib/util/comment-event-generator.js:110:23)
    at Controller.leave (<project_src>/node_modules/eslint/lib/eslint.js:898:36)
    at Controller.__execute (<project_src>/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
    at Controller.traverse (<project_src>/node_modules/eslint/node_modules/estraverse/estraverse.js:491:28)

Using Atom, I create a new react component and as I type render I receive the error above.

import React, {Component, PropTypes} from 'react';

export default class Foo extends Component {
    render
}
@ljharb
Copy link
Member

ljharb commented Aug 24, 2016

@dustinmoorenet I'm not sure why atom is linting mid-typing, but you have a syntax error right there, so you should be getting all kinds of errors in the linter. Try render() {} and see what happens?

@dustinmoorenet
Copy link
Author

dustinmoorenet commented Aug 24, 2016

It is fine if I finish out my typing. There is no long pause either. As soon as I type the r in render it flashes the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants