Lately, I’ve been getting simply the error in the title when running targets eg. build
, test
, graph
, lint
etc. whenever something breaks in the config files or folder/file setup in my NX monorepo workspace.
The See above for errors
is misleading since there are no meaningful details posted in the trace.
example –
I created a new nx
library and updated config files and now I can’t run any targets in my workspace. If I do run a target, I get this error –
user@user my-repo % npx nx test my-lib
NX Failed to create dependencies. See above for errors
Pass –verbose to see the stacktrace.
When I run the target with --verbose
, I get the following –
user@user my-repo % npx nx test my-lib –verbose
NX Failed to create dependencies. See above for errors
CreateDependenciesError: Failed to create dependencies. See above for errors
at buildProjectGraphUsingContext (/Users/user/frontend/my-repo/node_modules/nx/src/project-graph/build-project-graph.js:138:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at buildProjectGraphUsingProjectFileMap (/Users/user/frontend/my-repo/node_modules/nx/src/project-graph/build-project-graph.js:68:24)
at createAndSerializeProjectGraph (/Users/user/frontend/my-repo/node_modules/nx/src/daemon/server/project-graph-incremental-recomputation.js:229:55)
at processFilesAndCreateAndSerializeProjectGraph (/Users/user/frontend/my-repo/node_modules/nx/src/daemon/server/project-graph-incremental-recomputation.js:160:19)
at Timeout._onTimeout (/Users/user/frontend/my-repo/node_modules/nx/src/daemon/server/project-graph-incremental-recomputation.js:84:13)
As you can see there are no details posted above the NX error line and the stack trace doesn’t have anything specific any file that I would have touched during the buildProjectGraphUsingContext
call in the info.
is:question user:1234 “words here”