nx icon indicating copy to clipboard operation
nx copied to clipboard

Referenced project ... must have setting "composite": true

Open chriscurnow opened this issue 6 months ago • 6 comments

Current Behavior

My tsconfig files report an error:
Referenced project ... must have setting "composite": true.

Expected Behavior

Automatically generated tsconfig files should be error free.

GitHub Repo

No response

Steps to Reproduce

  1. create a new workspace
  2. create some projects
  3. Everything seems ok at first
  4. At some point I will be working on a project and suddenly this error will come up in the tsconfig file. I won't be working in the tsfonfig file. The error just appears.

Nx Report

nx (global)        : 19.4.3
nx                 : 19.5.3
@nx/js             : 19.5.3
@nx/jest           : 19.5.3
@nx/linter         : 19.5.3
@nx/eslint         : 19.5.3
@nx/workspace      : 19.5.3
@nx/angular        : 19.5.3
@nx/devkit         : 19.4.4
@nx/eslint-plugin  : 19.5.3
@nx/playwright     : 19.4.4
@nrwl/tao          : 19.5.3
@nx/web            : 19.5.3
@nx/webpack        : 19.5.3
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/playwright/plugin
@nx/eslint/plugin
---------------------------------------
Community plugins:
@ngrx/component-store : 18.0.2
@ngrx/effects         : 18.0.2
@ngrx/entity          : 18.0.2
@ngrx/operators       : 18.0.2
@ngrx/router-store    : 18.0.2
@ngrx/schematics      : 18.0.2
@ngrx/signals         : 18.0.2
@ngrx/store           : 18.0.2
---------------------------------------
The following packages should match the installed version of nx
  - @nx/[email protected]
  - @nrwl/[email protected]
  - @nx/[email protected]

To fix this, run `nx migrate [email protected]`

Failure Logs

No response

Package Manager Version

No response

Operating System

  • [X] macOS
  • [ ] Linux
  • [ ] Windows
  • [ ] Other (Please specify)

Additional Information

I realise this report is essentially the same as #20957 but I don't believe it should have been closed. The error persists in automatically generated tsconfig files. This is a bug. The comment referenced a link which no longer exists: https://github.com/nrwl/nx/issues/20957#issuecomment-1873769215. @jaysoo commented here https://github.com/nrwl/nx/issues/20957#issuecomment-1883587356, that we were free to add composite:true, but

  1. We shouldn't have to
  2. This produces errors in many other places. This should be handled by the generators.

chriscurnow avatar Aug 05 '24 08:08 chriscurnow