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

Cannot read property name of undefined #2912

Closed
prabakaranfresh opened this issue Jun 13, 2023 · 9 comments · Fixed by #2914
Closed

Cannot read property name of undefined #2912

prabakaranfresh opened this issue Jun 13, 2023 · 9 comments · Fixed by #2914
Labels

Comments

@prabakaranfresh
Copy link

aria-query released a new package 5.2.1 which is throwing an error for undefined in elementsRoleMap get method. All the component invocations which are undefined elementRoles are throwing as errors.

https://github.com/A11yance/aria-query/releases/tag/v5.2.1

Since the package.json didn't have a lock, the following error is occurring in template files which has a component invocation

-- error: Cannot read property 'name' of undefined undefined

@prabakaranfresh prabakaranfresh changed the title Cannot read property 'name' of undefined Cannot read property name of undefined Jun 13, 2023
@boris-petrov
Copy link
Contributor

I already opened an issue in aria-query.

@villander
Copy link

villander commented Jun 13, 2023

I got a fix with pnpm overrides:

"pnpm": {
    "overrides": {
      "aria-query": "5.1.3"
    },
}

@boris-petrov
Copy link
Contributor

So this is a bug in ember-template-lint - check this comment.

@kategengler
Copy link
Member

Link to the offending line

let implicitRoles = elementRoles.get(elementRoles.keys().find((key) => key.name === element));

This is breaking ember-cli's CI as well as the super-rentals-tutorial build.

@bmish
Copy link
Member

bmish commented Jun 14, 2023

Looks like it should be an easy fix. Can we get a failing code sample?

@kategengler
Copy link
Member

Conveniently, the tests for the rule are failing with floating dependencies in this repo's own CI https://github.com/ember-template-lint/ember-template-lint/actions/runs/5262654063/jobs/9512048400

@bmish
Copy link
Member

bmish commented Jun 14, 2023

Let's see if this fixes it: #2914

@bmish bmish added the bug label Jun 14, 2023
nvdk added a commit to lblod/frontend-toezicht-abb that referenced this issue Jun 16, 2023
nvdk added a commit to lblod/frontend-toezicht-abb that referenced this issue Jun 16, 2023
@ef4
Copy link
Contributor

ef4 commented Jul 16, 2023

Ugh, aria-query has now released a 5.3 that appears to undo these changes in 5.2.1. Their changelog literally says not to try using 5.2.

This breaks us again.

@ef4
Copy link
Contributor

ef4 commented Jul 16, 2023

Nevermind, false alarm! I accidentally was looking at a version of ember-template-lint before this PR.

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

Successfully merging a pull request may close this issue.

6 participants