Getting Error "Could not find 'nx' module in this workspace. Error: [readCachedProjectGraph] ERROR: No cached ProjectGraph is available" #27659
Unanswered
Hidayath2007
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I get the following error when trying to run nx build
If you are leveraging `readCachedProjectGraph()` directly then you will need to refactor your usage to first ensure that
the ProjectGraph is created by calling `await createProjectGraphAsync()` somewhere before attempting to read the data.
If you encounter this error as part of running standard `nx` commands then please open an issue on https://github.com/nrwl/nx
at readCachedProjectGraph (c:\g\source\node_modules\nx\src\project-graph\project-graph.js:30:15)
at run (c:\g\source\node_modules\nx\src\command-line\run\run.js:179:69)
at c:\g\source\node_modules\nx\bin\run-executor.js:60:48
at Generator.next ()
at c:\g\source\node_modules\tslib\tslib.js:118:75
at new Promise ()
at Object.__awaiter (c:\g\source\node_modules\tslib\tslib.js:114:16)
at process. (c:\g\source\node_modules\nx\bin\run-executor.js:58:44)
at process.emit (node:events:519:28)
at emit (node:internal/child_process:951:14)
Beta Was this translation helpful? Give feedback.
All reactions