I can enable caching without issues by configuring the taskRunnerOptions as described in this blogpost: https://blog.nrwl.io/distributed-caching-in-nx-164edfbc68e0
After adding the configuration:
{
// normal nx.json content...
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/src/tasks-runner/tasks-runner-v2",
"options": {
"cacheableOperations": ["build", "test", "lint"]
}
}
}
}
to my nx.json, I get the following error after running this command:
npm run affected:build -- --base=develop --prod
Unknown option: '--prod'
NX Report complete - copy this into the issue template
@nrwl/angular : 8.12.1
@nrwl/cli : 8.12.1
@nrwl/cypress : 8.12.1
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 8.12.1
@nrwl/linter : Not Found
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 8.12.1
@nrwl/web : Not Found
@nrwl/workspace : 8.12.1
typescript : 3.5.3
It has been fixed in 9x branch. You can use: npm run affected:build -- --base=develop --configuration=production
I was told by @isaacplmann that we don't need the runner option in newer versions
{
"//": "nx.json",
"tasksRunnerOptions": {
"default": {
"options": {
"cacheableOperations": ["build", "test", "lint"]
}
}
}
}
correct it is default now. This can be closed now, it works in the 9x branch.
Most helpful comment
correct it is default now. This can be closed now, it works in the 9x branch.