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

TypeError: Cannot read property 'value' of null #1589

Closed
orteth01 opened this issue Dec 30, 2019 · 4 comments
Closed

TypeError: Cannot read property 'value' of null #1589

orteth01 opened this issue Dec 30, 2019 · 4 comments

Comments

@orteth01
Copy link

Running eslint in our repo fails for version 2.19.0 with this error TypeError: Cannot read property 'value' of null.
Rolling back to 2.18.2 resolves the issue.

It looks like the problem is potentially related to 99b3fbf. node.source is null in ExportNamedDeclaration, which causes the failure. It fails for export class Component extends React.Component { ... }, export function Component() { ... }, and export const Component = () => { ... }

Please let me know if there's more information I can share to help diagnose this issue.

@orteth01
Copy link
Author

we have the following import related rules in our eslint config

    'import/extensions': 1,

    'import/prefer-default-export': 0,

    'import/no-extraneous-dependencies': [
      'error',
      {
        devDependencies: true,
        optionalDependencies: false,
        peerDependencies: false,
      },
    ],

@ljharb
Copy link
Member

ljharb commented Jan 1, 2020

Thanks, will take a look.

@ljharb
Copy link
Member

ljharb commented Jan 1, 2020

This appears to have been fixed with v2.19.1, can you upgrade and confirm?

Will reopen if not.

@ljharb ljharb closed this as completed Jan 1, 2020
ljharb added a commit to ljharb/eslint-plugin-import that referenced this issue Jan 1, 2020
These tests already passed, implying that import-js#1589 is a non-issue. However,
the guards are still good to add.
@orteth01
Copy link
Author

orteth01 commented Jan 2, 2020

confirming that fixed it. Thank you!

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

No branches or pull requests

2 participants