You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot read property 'map' of undefined
Occured whille linting C:\....
This occurs while the lib in question has nx module boundaries defined by the nx.json & .eslintrc.json
Expected Behavior
run nx lint library-name
Get actual linting errors/warnings
This can be achieved by setting our lib to a scope that has * for onlyDependOnLibsWithTags. Basically removing the nx module boundaries for the lib and circumnavigating the eslint rule that is breaking.
Steps to Reproduce
Using nx empty workspace with angular added for version 12.7.2 of @nrwl dependencies. Besides this I don't know how to reproduce & cannot share any of the source code of the project. Though I know of other projects that have experienced similar errors in vscode (not the command line like my behavior above).
Failure Logs
Unfortunately the logs in the Current Behavior section is all that is outputted in the console...
Environment
Node: 14.17.0
OS : win32 x64
yarn : 1.22.5
nx : Not Found
@nrwl/angular : 12.7.2
@nrwl/cli : 12.7.2
@nrwl/cypress : 12.7.2
@nrwl/devkit : 12.7.2
@nrwl/eslint-plugin-nx : 12.7.2
@nrwl/express : Not Found
@nrw/jest : 12.7.2
@nrwl/linter : 12.7.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.7.2
@nrwl/web : Not Found
@nrwl/workspace : 12.7.2
@nrwl/storybook : 12.7.2
@nrwl/gatsby : Not Found
typescript : 4.3.5
The text was updated successfully, but these errors were encountered:
Looking into the source code for the rule I realized the depConstraints object we have had no onlyDependOnLibsWithTags property. Adding that property with a value of [] gave us the expected behavior.
Possibly it would be worth having better error handling here in case this bit of the json is missing?
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
@meeroslav This would be more relevant now that we have banned imports support, as they may not have any tag based constraints. Do you care to take a look?
Current Behavior
run
nx lint library-name
Get error logs below:
This occurs while the lib in question has nx module boundaries defined by the nx.json & .eslintrc.json
Expected Behavior
run
nx lint library-name
Get actual linting errors/warnings
This can be achieved by setting our lib to a scope that has
*
foronlyDependOnLibsWithTags
. Basically removing the nx module boundaries for the lib and circumnavigating the eslint rule that is breaking.Steps to Reproduce
Using nx empty workspace with angular added for version 12.7.2 of
@nrwl
dependencies. Besides this I don't know how to reproduce & cannot share any of the source code of the project. Though I know of other projects that have experienced similar errors in vscode (not the command line like my behavior above).Failure Logs
Unfortunately the logs in the
Current Behavior
section is all that is outputted in the console...Environment
Node: 14.17.0
OS : win32 x64
yarn : 1.22.5
nx : Not Found
@nrwl/angular : 12.7.2
@nrwl/cli : 12.7.2
@nrwl/cypress : 12.7.2
@nrwl/devkit : 12.7.2
@nrwl/eslint-plugin-nx : 12.7.2
@nrwl/express : Not Found
@nrw/jest : 12.7.2
@nrwl/linter : 12.7.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.7.2
@nrwl/web : Not Found
@nrwl/workspace : 12.7.2
@nrwl/storybook : 12.7.2
@nrwl/gatsby : Not Found
typescript : 4.3.5
The text was updated successfully, but these errors were encountered: