Skip to content

TypeError: Cannot read property 'name' of undefined for no-debug #101

Closed
@tdeekens

Description

@tdeekens

We adopted the react preset recently and are seeing failing builds on CI with the error TypeError: Cannot read property 'name' of undefined. Which seems to originate from this code:

ImportDeclaration(node) {
    const screenModuleName = LIBRARY_MODULES_WITH_SCREEN.find(
      module => module === node.source.value
    );

    if (
      screenModuleName &&
      node.specifiers.some(
        specifier => specifier.imported.name === 'screen'
      )
    ) {
      hasImportedScreen = true;
    }
},

in no-debug.js on line 95.

CleanShot 2020-03-30 at 10 29 58@2x

We are also seeing the error on a GitHub Action build to inspect for you.

https://github.com/commercetools/merchant-center-application-kit/pull/1419/checks?check_run_id=544774992

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions