-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
eslint cli: TypeError: Error while loading rule '@nx/enforce-module-boundaries': Cannot read properties of undefined (reading 'keyword') #20752
Comments
Got the same error myself in VSCode. easiest solution was to reload the window (or restart vscode) and the service started back up without a problem. |
Restarting VSCode did not solve the issue for me, I had to remove the rule altogether (which I would prefer not to do) as a temporary solution in order to get rid of the error and have eslint running in VSCode |
This error also occurs for us when running the lint step in our continuous integration platform (CircleCI) |
I have the same issue locally after upgrading to nx17! Any restarting etc will not fix the issue for me, but for others in my team it did end up fixing it. |
Please note I also encounter this problem on our project. Locally it works perfectly. In a github CI context, we encounter the error. "lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/layout/**/*.ts", "libs/layout/**/*.html"]
}
}
Was working perfectly on 16.10.0 |
Any update on fixing this issue ? |
I have the same issue locally with VSCode and Angular 17 |
i can reproduce the same issue with mac setup + pnpm |
Same here with this combination, surprising since it's going great on a different machine. |
Thank you all for chiming in. I will look at it now. The rule, unfortunately, does not work unless there is a graph available since it depends on the graph information. But it should not block the eslint either. |
Workaround needed because of nrwl/nx#20752
Workaround needed because of nrwl/nx#20752
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I run
pnpm exec eslint src/**/*.ts modules/**/*.ts
on a simple workspace based on https://nx.dev/getting-started/tutorials/angular-standalone-tutorial, and the command fails with the following error, if there is no cached graph in the .nx dir:Expected Behavior
The eslint cli should work. I have similar issues with PyCharm's built-in eslint functionality.
pnpm exec nx run-many -t lint
works as expected.GitHub Repo
https://github.com/gergelyszerovay/nx17-eslint-issue/
Steps to Reproduce
pnpm exec nx reset
pnpm exec eslint src/**/*.ts modules/**/*.ts
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
The users in this discussion have the same issue: #20194
The text was updated successfully, but these errors were encountered: