nx
nx copied to clipboard
Error: CloseBraceExpected in /home/circleci/project/node_modules/.cache/nx/nxdeps.json
Current Behavior
Nx CLI crashes during CI run.
Expected Behavior
Nx CLI doesn't crash.
Steps to Reproduce
Happened during CI run:
https://cloud.nx.app/runs/wrsuVMhD0of
Failure Logs
Error reading '/home/circleci/project/node_modules/.cache/nx/nxdeps.json'. Continue the process without the cache.
Error: CloseBraceExpected in /home/circleci/project/node_modules/.cache/nx/nxdeps.json at position 385024
at parseJson (/home/circleci/project/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nx/src/utils/json.js:23:15)
at readJsonFile (/home/circleci/project/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nx/src/utils/fileutils.js:23:37)
at readCache (/home/circleci/project/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nx/src/project-graph/nx-deps-cache.js:41:49)
at readCachedProjectGraph (/home/circleci/project/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/nx/src/project-graph/project-graph.js:20:61)
at checkDependencies (/home/circleci/project/node_modules/.pnpm/@[email protected]_osi77fjxs57mwennraun4e6pmi_7tybhtwyz6spdrinxewf6jf4oy/node_modules/@nrwl/js/src/utils/check-dependencies.js:7:62)
at tscExecutor_1 (/home/circleci/project/node_modules/.pnpm/@[email protected]_osi77fjxs57mwennraun4e6pmi_7tybhtwyz6spdrinxewf6jf4oy/node_modules/@nrwl/js/src/executors/tsc/tsc.impl.js:29:111)
at tscExecutor_1.next (<anonymous>)
at resume (/home/circleci/project/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:230:48)
at /home/circleci/project/node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.js:229:125
at new Promise (<anonymous>)
> NX [readCachedProjectGraph] ERROR: No cached ProjectGraph is available.
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
Pass --verbose to see the stacktrace.
Environment
What's the output of nx report
?
Are you running nx commands simultaneous in parallel? Might be the same issue as #9146.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.