Nx: Unknown option --prod when configured taskRunnerOptions

Created on 21 Mar 2020  路  3Comments  路  Source: nrwl/nx

Expected Behavior

I can enable caching without issues by configuring the taskRunnerOptions as described in this blogpost: https://blog.nrwl.io/distributed-caching-in-nx-164edfbc68e0

Current Behavior

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'

Context

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

core bug

Most helpful comment

correct it is default now. This can be closed now, it works in the 9x branch.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zpydee picture zpydee  路  3Comments

ZempTime picture ZempTime  路  3Comments

Koslun picture Koslun  路  3Comments

Svancara picture Svancara  路  3Comments

jon301 picture jon301  路  3Comments