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

Bug: TypeError: Cannot read properties of undefined (reading 'type') #16899

Closed
1 task
kodamor opened this issue Feb 16, 2023 · 1 comment
Closed
1 task

Bug: TypeError: Cannot read properties of undefined (reading 'type') #16899

kodamor opened this issue Feb 16, 2023 · 1 comment
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed

Comments

@kodamor
Copy link

kodamor commented Feb 16, 2023

Environment

Node version: 16.14.2
yarn version: 1.22.19
Local ESLint version: 8.34.0
Global ESLint version: 8.34.0
Operating System: Debian GNU/Linux 10 (buster)

What parser are you using?

@typescript-eslint/parser

What did you do?

Everything worked before I did the following commands :

yarn upgrade
eslint ./assets/js --ext .ts,.vue

I tried going to the previous version but it did not resolve my issue

What did you expect to happen?

I expected ESLint to run as usual

What actually happened?

I received the following error :

yarn run v1.22.19
$ eslint ./assets/js --ext .ts,.vue

Oops! Something went wrong! :(

ESLint: 8.34.0

TypeError: Cannot read properties of undefined (reading 'type')
Occurred while linting C:\Users\david\PhpstormProjects\interfaceb2b\assets\js\api\Data\ApplicationData.ts:1
    at Array.<anonymous> (C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\node_modules\esquery\dist\esquery.min.js:1:29469)
    at C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\node_modules\esquery\dist\esquery.min.js:1:29985
    at C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\node_modules\esquery\dist\esquery.min.js:1:30512
    at Function.b.matches (C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\node_modules\esquery\dist\esquery.min.js:1:34848)
    at NodeEventGenerator.applySelector (C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\lib\linter\node-event-generator.js:296:21)
    at NodeEventGenerator.applySelectors (C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\lib\linter\node-event-generator.js:324:22)
    at NodeEventGenerator.enterNode (C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\lib\linter\node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\lib\linter\code-path-analysis\code-path-analyzer.js:795:23)
    at C:\Users\david\PhpstormProjects\interfaceb2b\node_modules\eslint\lib\linter\linter.js:1153:32
    at Array.forEach (<anonymous>)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

My package.json :

    "eslint": "^8.22.0",
    "eslint-config-vue": "^2.0.2",
    "eslint-formatter-gitlab": "^4.0.0",
    "eslint-plugin-unused-imports": "^2.0.0",
    "eslint-plugin-vue": "^9.4.0",
    "eslint-webpack-plugin": "^3.2.0",
    "@typescript-eslint/eslint-plugin": "^5.36.1",
    "@typescript-eslint/parser": "^5.36.1",
    "@vue/eslint-config-typescript": "^11.0.0",
    "vue-eslint-parser": "^9.0.3",
@kodamor kodamor added bug ESLint is working incorrectly repro:needed labels Feb 16, 2023
@mdjermanovic
Copy link
Member

Duplicate of #16896

@mdjermanovic mdjermanovic marked this as a duplicate of #16896 Feb 16, 2023
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Aug 16, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed
Projects
Archived in project
Development

No branches or pull requests

2 participants