TypeError when calling toObservable in convert-nx-executor.ts
See original GitHub issueCurrent Behavior
Running ng lint
causes an error in the devkit package of nx
.
Expected Behavior
No error to be thrown
The issue is at https://github.com/nrwl/nx/blob/master/packages/devkit/src/utils/convert-nx-executor.ts#L52
if ((!value as any).next) {
should be if (!(value as any).next) {
(note the placement of the exclamation mark).
Steps to Reproduce
I’m not sure this requires steps to reproduce. The code cannot work since any value, whether it had a next
attribute or not, would fail to satisfy the condition and any value that should have passed the condition would cause the error on line 60
I think it would be ideal to have a unit test for this toObservable to avoid this type of issue.
Failure Logs
.../node_modules/@nrwl/devkit/src/utils/convert-nx-executor.js:55
.next()
^
TypeError: iterator.next is not a function
at recurse (/Users/dave/dev/kahi/web-client-app/node_modules/@nrwl/devkit/src/utils/convert-nx-executor.js:55:26)
at /Users/dave/dev/kahi/web-client-app/node_modules/@nrwl/devkit/src/utils/convert-nx-executor.js:72:17
Environment
NX Report complete - copy this into the issue template
Node : 16.15.1 OS : darwin arm64 npm : 6.14.15
nx : 14.5.8 @nrwl/angular : Not Found @nrwl/cypress : Not Found @nrwl/detox : Not Found @nrwl/devkit : 14.5.8 @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : Not Found @nrwl/js : Not Found @nrwl/linter : Not Found @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : Not Found @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : Not Found @nrwl/web : Not Found @nrwl/workspace : Not Found typescript : 4.6.4
Local workspace plugins:
Community plugins: rxjs: 6.5.5 @cypress/schematic: 2.0.2
Issue Analytics
- State:
- Created a year ago
- Reactions:13
- Comments:9 (2 by maintainers)
Top GitHub Comments
Had the same issue, fixed it by updating those devDependencies to a version 14.0.3 in my package.json file
Also, we can find info about @nrwl/devkit updates in angular-eslint changelog CHANGELOG.md
The only affected package version with this should be 14.5.8, since 14.5.9 has been released
nx migrate 14.5.9
is the recommended remediation for the bug.