Reputation: 71
I upgraded the nx version from 12.10.0 to 14.1.9 especially to upgrade the angular version from 12.2.15 - 13.3.9. The migration worked correctly but when I do yarn nx run {home}:serve
.
I see this error:
TypeError: Cannot read property 'cloud' of undefined at nxCloudTasksRunner (/Users/ghoshi/Desktop/Work/Content-Platform/vcap-platform-applications/node_modules/@nrwl/nx-cloud/lib/nx-cloud-tasks-runner.js:20:27) at /Users/ghoshi/Desktop/Work/Content-Platform/vcap-platform-applications/node_modules/nx/src/tasks-runner/run-command.js:78:37 at Generator.next () at fulfilled (/Users/ghoshi/Desktop/Work/Content-Platform/vcap-platform-applications/node_modules/nx/node_modules/tslib/tslib.js:114:62) at processTicksAndRejections (internal/process/task_queues.js:95:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Upvotes: 7
Views: 2190
Reputation: 41
I found the issue, It has to do with the version of NX cloud that is compatible with NX 14.1.9. The nxcloud version comes with the migration is 14.6 while the working version is 14.0. So once I downgraded to 14.0. NX cloud starts working again.
Upvotes: 4
Reputation: 81
I had a problem similar to yours. I even tried deleting the node_modules
folder and installing again, but it didn't fix the error... In my case, I solved it by updating the taskRunnerOptions
setting in the nx.json
file, and switched from cloud to runner default workspace as follows:
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
}
},
Upvotes: 8