-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Current Behavior
Processing the project graph fails when vite.config.ts is being processed. I am executing eslint and processing fails when building the nx graph for the vite files that are present in my workspace. I only receive this error on Jenkins for 30-50% of my builds. I was not able to reproduce it locally thus far. For me thats an indicator that it is actually a race condition as suggested by the stack trace below.
Error Message: NX Failed to process project graph.
Expected Behavior
The execution of eslint continues without any error
GitHub Repo
No response
Steps to Reproduce
- Setup an nx workspace with eslint and vite/vitest
- Run eslint
Try to slow down the process somehow. I assume this increases the risk of the race condition to take
effect and fail. Our jenkins nodes are very slow therefore I was only able to reproduce it on builds there and I am
Nx Report
Node : 22.20.0
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.9.3
nx : 21.6.5
@nx/js : 21.6.5
@nx/jest : 21.6.5
@nx/eslint : 21.6.5
@nx/workspace : 21.6.5
@nx/angular : 21.6.5
@nx/devkit : 21.6.5
@nx/esbuild : 21.6.5
@nx/eslint-plugin : 21.6.5
@nx/express : 21.6.5
@nx/module-federation : 21.6.5
@nx/node : 21.6.5
@nx/plugin : 21.6.5
@nx/rspack : 21.6.5
@nx/vite : 21.6.5
@nx/web : 21.6.5
@nx/webpack : 21.6.5
@nx/docker : 21.6.5
typescript : 5.9.2
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/vite/plugin
---------------------------------------
Community plugins:
@analogjs/vite-plugin-angular : 1.21.2
@analogjs/vitest-angular : 1.21.2
@ng-bootstrap/ng-bootstrap : 19.0.1
@ngrx/component : 20.0.1
@ngrx/component-store : 20.0.1
@ngrx/effects : 20.0.1
@ngrx/entity : 20.0.1
@ngrx/eslint-plugin : 20.0.1
@ngrx/operators : 20.0.1
@ngrx/router-store : 20.0.1
@ngrx/schematics : 20.0.1
@ngrx/store : 20.0.1
@ngrx/store-devtools : 20.0.1
@syncfusion/ej2-angular-base : 30.2.4
@syncfusion/ej2-angular-buttons : 30.2.4
@syncfusion/ej2-angular-calendars : 30.2.4
@syncfusion/ej2-angular-dropdowns : 30.2.6
@syncfusion/ej2-angular-grids : 30.2.6
@syncfusion/ej2-angular-inputs : 30.2.6
@syncfusion/ej2-angular-interactive-chat : 30.2.7
@syncfusion/ej2-angular-navigations : 30.2.7
@syncfusion/ej2-angular-popups : 30.2.4
@syncfusion/ej2-angular-querybuilder : 30.2.6
@syncfusion/ej2-angular-splitbuttons : 30.2.4
angular-eslint : 20.4.0
ng-zorro-antd : 20.3.1
ngrx-immer : 4.0.0
---------------------------------------
Cache Usage: 0.00 B / 92.64 GB
This is "local" not the jenkins output. Jenkins is using [email protected] and [email protected]
Failure Logs
libs/some-lib/vite.config.ts: Error [ERR_INTERNAL_ASSERTION]: Cannot require() ES Module [...]/node_modules/@analogjs/vite-plugin-angular/src/index.js because it is not yet fully loaded. This may be caused by a race condition if the module is simultaneously dynamically import()-ed via Promise.all(). Try await-ing the import() sequentially in a loop instead. (from [...]/libs/some-lib/vitest.config.ts)
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at Function.fail (node:internal/assert:17:9)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:375:16)
at loadESMFromCJS (node:internal/modules/cjs/loader:1561:24)
at Module._compile (node:internal/modules/cjs/loader:1712:5)
at node:internal/modules/cjs/loader:1895:10
at _require.extensions.<computed> (file:///home/jenkins/agent/workspace/[...]/node_modules/vite/dist/node/chunks/dep-B0GuR2De.js:36138:9)
at Module.load (node:internal/modules/cjs/loader:1465:32)
at Function._load (node:internal/modules/cjs/loader:1282:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
Package Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
There is only one issue I found that might be related: #31855