nx: @nrwl/workspace upgrade from 15.6.3 to 15.7.0 breaks Angular build - Unable to read angular.json
Current Behavior
Exception raised causing the build to fail.
Expected Behavior
Normal Angular build
GitHub Repo
No response
Steps to Reproduce
Unable to provide an example repo or further steps at this time. I tried using the nx_examples repo with latest dependencies and was unable to reproduce the issue.
Nx Report
Node : 17.5.0
OS : linux x64
npm : 8.4.1
nx : 15.7.0
@nrwl/jest : 15.7.0
@nrwl/linter : 15.7.0
@nrwl/workspace : 15.7.0
@nrwl/angular : 15.7.0
@nrwl/cli : 15.7.0
@nrwl/cypress : 15.7.0
@nrwl/devkit : 15.7.0
@nrwl/eslint-plugin-nx : 15.7.0
@nrwl/js : 15.7.0
@nrwl/rollup : 15.7.0
@nrwl/tao : 15.7.0
@nrwl/web : 15.7.0
@nrwl/webpack : 15.7.0
typescript : 4.9.5
---------------------------------------
Community plugins:
@ngrx/store-devtools : 15.3.0
Failure Logs
Unable to read angular.json
RangeError: Maximum call stack size exceeded
at arrayBufferToString (/home/david/Development/stemcmono/node_modules/nx/src/adapter/ngcli-adapter.js:256:32)
at /home/david/Development/stemcmono/node_modules/nx/src/adapter/ngcli-adapter.js:241:73
at /home/david/Development/stemcmono/node_modules/rxjs/dist/cjs/internal/operators/map.js:10:37
at OperatorSubscriber._this._next (/home/david/Development/stemcmono/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
at OperatorSubscriber.Subscriber.next (/home/david/Development/stemcmono/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
at SafeSubscriber.__tryOrUnsub (/home/david/Development/stemcmono/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/home/david/Development/stemcmono/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:143:22)
at Subscriber._next (/home/david/Development/stemcmono/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:89:26)
at Subscriber.next (/home/david/Development/stemcmono/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:66:18)
at Observable._subscribe (/home/david/Development/stemcmono/node_modules/@angular-devkit/core/node/host.js:130:17)
Additional Information
Issue appears to be caused by @nrwl/workspace package as other packages can be upgraded with out problems.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 22 (5 by maintainers)
After some more detailed investigation I discovered not all my
project.jsoncontainednameproperty for the library. Not sure why some of my libraries had these and others did not.project.json
After fixing all my
project.jsonfiles, the error went away.Another interesting collision that occurred with the name is that it needs to be not only be unique (which I already knew), but the you cannot use have suffix names
Having the library called
ui-shared-componentswill cause theui-shared-components-inputto fail. This caused an issue with the e2e project namings as wellmy-appandmy-app-e2ecaused a conflict.