Linting --with-deps does not work on Nx 12.8
See original GitHub issueCurrent Behavior
Linting a project and all its dependencies does not work.
Expected Behavior
Linting a project and all its dependencies should work. I believe this is a regression. Even if --with-deps is deprecated, it should still work until Nx 14.
Steps to Reproduce
- Clone nx-examples repo
- Run
yarn yarn nx lint cart --with-deps
This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
$ nx lint cart --with-deps
DEPRECATION WARNING: --with-deps is deprecated and it will be removed in v14.
Configure target dependencies instead: https://nx.dev/latest/angular/core-concepts/configuration#target-dependencies.
> NX Running target lint for project cart and 8 task(s) that it depends on.
βββββββββββββββββββββββββββββββββββββββββββββββ
> nx run shared-jsxify:lint
Linting "shared-jsxify"...
All files pass linting.
> nx run shared-product-types:lint
Linting "shared-product-types"...
All files pass linting.
Unexpected error:
TypeError: Cannot read property 'tags' of undefined
at C:\Users\agokhale\source\nx-examples\node_modules\@nrwl\linter\src\executors\eslint\hasher.js:16:75
at Array.map (<anonymous>)
at C:\Users\agokhale\source\nx-examples\node_modules\@nrwl\linter\src\executors\eslint\hasher.js:16:44
at Generator.next (<anonymous>)
at fulfilled (C:\Users\agokhale\source\nx-examples\node_modules\tslib\tslib.js:114:62)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Environment
Node : 14.16.1
OS : win32 x64
yarn : 1.22.5
nx : Not Found
@nrwl/angular : 12.8.0
@nrwl/cli : 12.8.0
@nrwl/cypress : 12.8.0
@nrwl/devkit : 12.8.0
@nrwl/eslint-plugin-nx : 12.8.0
@nrwl/express : Not Found
@nrwl/jest : 12.8.0
@nrwl/linter : 12.8.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 12.3.10
@nrwl/react : 12.8.0
@nrwl/schematics : Not Found
@nrwl/tao : 12.8.0
@nrwl/web : 12.8.0
@nrwl/workspace : 12.8.0
@nrwl/storybook : 12.8.0
@nrwl/gatsby : Not Found
typescript : 4.3.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Linting with nx workspace not working Β· Issue #1094 - GitHub
We have just migrated over to using the Angular CLI with an nx workspace, and we are having trouble getting any sort of...
Read more >@nrwl/linter - NPM Package Overview - Socket
The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.
Read more >Core Performance Improvements, Webpack 5, React Native ...
The Nx team is always focused on performance from the core of the build ... workspaces and to report any issues through the...
Read more >@nrwl/linter - npm
The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.
Read more >@nrwl/linter | Nx
The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@maxisam - yeah it did the same for me. Both --with-deps or using targetDependencies ends up in the same error. The good news is this is fixed in NX 13!
@maxisam Its being deprecated because now you can define targetDependencies. You can read more about it at https://nx.dev/l/r/core-concepts/configuration and under the Target Dependencies section.